I have a container and several inner divs.
.container {
display: inline-flex;
flex-flow: column wrap;
max-height: 500px;
}
.element {
width: 200px;
height: 200px;
margin: 10px;
background: #000;
}
Now I have 3 flex columns.
What I expected: Container's width becomes equal to the sum of columns' width (660px).
What I got: Container's width becomes equal to the first column's width.
The pen: http://codepen.io/korsun/pen/zGpQrZ
Why? When I change flex-direction to row and max-height to max-width everything goes just as expected. Is there a way to make my container's width equal to content width?