I have a list of items I'd like to have in columns next to each other. I don't know how many items there will be so I can't have a fixed height. I want them to fill the space a good as possible like so:
#parent {
background-color: firebrick;
max-height: 200px; /* <-- eliminate */
display: flex;
flex-flow: column wrap;
}
.child {
background-color: #fff;
height: 30px;
width: 100px;
margin: 10px;
padding: 3px;
}
<div id="parent">
<div class="child">child</div>
<div class="child">child</div>
<div class="child">child</div>
<div class="child">child</div>
<div class="child">child</div>
<div class="child">child</div>
<div class="child">child</div>
<div class="child">child</div>
</div>
So I basically want the above but without the max-height
on #parent
but when I remove it they will just be in one wide column.