Please see the example attached.
i need the following:
- have a column layout.
flex-direction:column;
- have a wrap break-point after child 2.
- all childs must be directly descendant of parent container.
Currently i can achieve this by specifying explicit height to the container. for example: height:100px
.
however, i don't want to do this. i want the second child take as height as it needs to have (by the content), and the third child to follow on the second column.
thanks.
.flex-container {
display: flex;
flex-flow: column wrap;
}
.child {padding: 0.5em;background: rgba(0,0,255,0.15);}
<div class="flex-container">
<div class="child one">Child One</div>
<div class="child two">Child Two</div>
<div class="child three">Child Three</div>
<div class="child four">Child Four</div>
</div>