I have a parent that's using display: flex;
. It has four children (cards) currently, but it may have more. All the children need big, but equal, widths.
For example, each child needs a 40%
width. If that happens, only a certain amount of children will fit on the screen. I need to be able to do that, and have the rest of the children be accessible with horizontal scrolling.
How do I achieve this? I tried using flex-wrap: no-wrap;
and then increasing the width of the children, but the parent doesn't allow that. This seems intentional, but I basically want to override this behaviour.
HTML
<div id="parent">
<div class="children">
<card-header>
<b class="text"">Text</b>
</card-header>
</div>
</div>
CSS
#parent {
display: flex;
flex-flow: row no-wrap;
align-content: flex-start;
justify-content: space-around;
background-color: blue;
height: 100%;
}
.children {
width: 50%;
height: 100%;
}