Here is an example of my extensive HTML code, filled with links:
<-- language: lang-html -->
<ul>
<li><a href="/link.html">Link1</a></li>
<li><a href="/link.html">Link2</a></li>
<li><a href="/link.html">Link3</a></li>
<li><a href="/link.html">Link4</a></li>
<li><a href="/link.html">Link5</a></li>
<li><a href="/link.html">Link6</a></li>
<li><a href="/link.html">Link7</a></li>
<li><a href="/link.html">Link8</a></li>
<li><a href="/link.html">Link9</a></li>
<li><a href="/link.html">Link10</a></li>
</ul>
This structure consists of one <ul>
with multiple <li>
elements.
I want to display this content on the page in 5 columns, like so:
Link1 Link3 Link5 Link7 Link9
Link2 Link4 Link6 Link8 Link10
You can find a similar explanation at this URL: . However, it results in a different layout where the links are positioned horizontally instead of vertically, as shown below:
Link1 Link2 Link3 Link4 Link5
Link6 Link7 Link8 Link9 Link10
Since I am not using any JavaScript framework on my site, I am seeking a solution that only involves CSS and possibly minimal framework-independent JavaScript. Any ideas for achieving this layout?