I have multiple lists of data, made up of unordered lists in HTML and I'm trying to get them to display in 2 columns.
I've got them appearing as 'columns' but I can't get the columns to display how I want them to.
If you look at the below snippet you can see that the columns are aligned in 2 columns, but I'd like the columns to be sequential, so A, B, C, D in the left column and D, E, F etc in the right column.
I've used Flexbox and have been messing around with flex-direction
but to no avail. Any tips? What am I doing wrong? Also, here's a Fiddle.
ul {
display: flex;
width: 500px;
align-items: flex-start;
flex-wrap: wrap;
}
ul li {
width: 50%;
}
<ul>
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
<li>E</li>
<li>F</li>
<li>G</li>
</ul>
I know that this is something silly and trivial but what am I missing? I'm using Sass too.