I have this situation where some columns are really large and others are smaller and I would like to merge these smaller ones not to waste space.
The container div has flex direction row and the columns are div's as well. This is the normal behaviour, but how do I change this to my desired outcome?
A picture says more than a thousand words.
Snippet
#container { display: flex; flex-flow: row wrap; background: red; width: 300px; }#container div { background: blue; width: 100px; height: 40px; }#container div.large { background: green; height: 200px; }
<div id="container"><div>1</div><div>2</div><div class="large">3</div><div>4</div><div>5</div><div>6</div></div>
Found it in -duplicate- question answers
https://w3bits.com/flexbox-masonry/ -> Vertical Flexbox Masonry
display: flex;flex-flow: column wrap;max-height: 800px;margin-left: -8px; /* Adjustment for the gutter */width: 100%;