I'm trying to justify variable number of li
elements, to fill the width of a ul
block with equal spacing between them. It would be important to have minimal distance between the elements.
I tried various solutions from StackOverflow answers, for example https://stackoverflow.com/a/10020586/3897243, but none of them worked out for me.
HTML:
<ul class="clearfix">
<li><a href="/projektek/covenantal-cathexion/">Covenantal</a>
</li>
<li><a href="/projektek/inyoite-unstintingly/">Inyoite</a>
</li>
<li><a href="/projektek/myopical-gaspingly/">Myopical</a>
</li>
<li><a href="/projektek/funiculate-periarthritis/">Funiculate</a>
</li>
<li><a href="/projektek/uncompromisingness-mastatrophia/">Uncompromisingness</a>
</li>
</ul>
CSS:
li {
float: left;
list-style: none;
font-size: 20px;
line-height: 1.5;
display: inline-block;
}
ul::after {
width: 100%;
display: inline-block;
content: ".";
visibility: hidden
}
li {
display: inline-block
}