I have some simple HTML and CSS to split a list into 4 columns. Instead of the normal behavior where it fits each list item into whichever column has enough space for it, I want to force it to put each list item into its own column.
So in my example <li>Column 1</li>
will always only be in the 1st column. <li>Column 2<br>Column 2<br>Column 2<br>Column 2</li>
will always only be in the 2nd column. Same with column 3 and 4.
Is there a way to accomplish this while using the columns
property?
ul.data-points {
columns: 4;
column-gap: 20px;
}
<ul class="data-points">
<li>Column 1</li>
<li>Column 2<br>Column 2<br>Column 2<br>Column 2</li>
<li>Column 3</li>
<li>Column 4</li>
</ul>