In a site we have a dropdown menu that contains a div that has a set width and a set height. The items are stacked with a flex-direction: column and a flex wrap. However when items get added we respectively add up with an overflow of the content on the right side.
Current css in a nutshell
.flex-container {
display: flex;
height: 400px;
width: (now set to a fixed width, but aim is dynamic)
flex-wrap: wrap;
flex-direction: column;
}`
flex-item {
width: 100px;
}
So we want to have the container width dynamically, preferably without any JS.
Anyone got a fiddle on how to accomplish this?
I also tried some inline-block / float solutions, but flex so far gives "most preferable" solution, but without the dynamic width