Flex-flow: Column Wrap, In A Flex Box Causing Overflow Of Parent Container
I have this scenario: https://jsfiddle.net/b6zcdgf7/ When using .section.vert the .box elements overflow the section. Is there anything i can do to prevent having to set a width o
Solution 1:
Change the flex-wrap
to nowrap
.section.vert{
flex-direction:column;
flex-wrap: nowrap;
outline: 3px dashed green;
}
Snippet
.container{
display:flex;
height:3em;
border:solid thin blue;
}
.section{
border:solid thin gray;
display:flex;
}
.section.horiz{
}
.section.vert{
flex-direction:column;
flex-wrap: nowrap;
outline: 3px dashed green;
}
.box{
border:solid thin red;
width:1em;
height:1em;
}
<divclass="container"><divclass="section horiz"><divclass="box"></div><divclass="box"></div></div><divclass="section horiz"><divclass="box"></div><divclass="box"></div></div><divclass="section horiz"><divclass="box"></div></div><divclass="section vert"><divclass="box"></div><divclass="box"></div><divclass="box"></div><divclass="box"></div></div></div>
Post a Comment for "Flex-flow: Column Wrap, In A Flex Box Causing Overflow Of Parent Container"