I want to fill many div elements vertically into another div element, parent node, like in the below scatch code, but the parent div should be horizontally scrollable, so I have a fixed Height of parent div, and Width should be something Auto value, so I can fill many elements like in result image below, please see the image
Let's say I have this HTML code:
<div id="content" style="width:600px; height:300px;">
<div id="element1" style="height:25px; width:50px;"> ... </div>
<div id="element2" style="height:25px; width:50px;"> ... </div>
<div id="element3" style="height:25px; width:50px;"> ... </div>
<div id="element4" style="height:25px; width:50px;"> ... </div>
<div id="element5" style="height:25px; width:50px;"> ... </div>
....
<div id="element_N" style="height:25px; width:50px;"> ... </div>
</div>
What CSS I should use or Javascript, but better if only CSS to get this result:
I tried to use CSS:
display: flex;
flex-direction: column;