I have a list of items (fetched from CMS) whose number is unknown. I need to display this list in two columns of roughly equal number of items. The following code works but I explain below why it's problematical:
<ul>
<li>content</li>
<li>content</li>
<li>content</li>
<li>content</li>
<li>content</li>
</ul>
ul {
display: flex;
flex-wrap: wrap;
}
It's all good if the items' content is always the same height. But when one item has a much longer content in it, the sibling item on the same row is forced to expand to match the same height. I don't want that. I want the two columns to be completely independent in terms of items' height.
Possible with CSS alone?
EDIT:
Here is a JSfiddle exposing the problem: https://jsfiddle.net/g9p3m2dp/