Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1675

Flex-direction: column child elements overflow width [duplicate]

$
0
0

I have a navigation menu where I want a fixed height and for the sub-menus to wrap vertically so I end up with columns of menus. Trying flex column, the wrapping works, but the parent ul does not enlarge to fit the children horizontally. Instead, the child menus just overflow the parent width. See here:

https://jsfiddle.net/6wpg5oqr/

#parent {  display:flex;   flex-flow:column wrap;  background-color:red;  height:100px;}#parent > * {  min-width:0;}<ul id='parent'><li><ul><li>      aaaaaaaaaaa</li><li>      aaaaaaaaaaa</li><li>      aaaaaaaaaaa</li>// ...</ul></li></ul>

Why is this happening? I've seen it suggested to use min-width:0 on the children, but as you can see that didn't do anything.


Viewing all articles
Browse latest Browse all 1675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>