I'm trying to get multiple wrapped columns of items in flexbox. I have two columns of items in my HTML, call them colA and colB. colA doesn't fit within the container's height, so it wraps into colA1 and colA2. My problem is that colB ends up on top of colA2, not to its right as I'd expect. Here's an example. I've colored colA orange and colB blue. You can see colA wrapping underneath colB (and the overflow columns don't use the bg color at all -- maybe related?)
.row {
display: flex;
flex-direction: row;
}
.column {
display: flex;
flex-wrap: wrap;
flex-direction: column;
height: 80px;
}
.item {
padding: 5px;
}
#colA {
background: rgba(100%, 50%, 0%, 1.0);
border: dotted;
}
#colB {
height: 100px;
background: rgba(00%, 50%, 100%, 0.5);
border: dashed;
opacity: 50%;
}
<div class="row">
<div class="column" id="colA">
<div class="item">ColA thing1</div>
<div class="item">ColA another thing</div>
<div class="item">ColA what is this?</div>
<div class="item">ColA keep going</div>
<div class="item">ColA still here?</div>
<div class="item">ColA wrap wrap</div>
</div>
<div class="column" id="colB">
<div class="item">Column B something</div>
<div class="item">Column B another thing</div>
</div>
</div>