In this example, I use flex-direction:row
http://jsfiddle.net/9a1d2ddz/
If the space is not suitable for elements, a vertical scroll bar appears
I want to achieve the same, but with the ordering of the boxes "top to bottom"
http://jsfiddle.net/ebd8rsnx/
but instead of getting the horizontal scrollbar, I want to keep the vertical
basically the same thing from the above, but with ordering from top to bottom and not from left to right
I thought this was what I can do with max-height: min-content, but it seems to have no effect.
early
div
{
overflow:auto;
border:2px blue solid;
box-sizing:border-box;
flex-direction:column;
display:flex;
flex-wrap:wrap;
}
span
{
min-width:150px;
min-height:150px;
flex:1 1 auto;
border:1px red solid;
display:block;
overflow:hidden;
box-sizing:border-box;
}
user652649
source
share