I read this article An almost complete guide to flexbox (without flexbox) , and I'm trying to use the "-between space", I have code like this:
ul {
margin: 0;
padding: 0;
text-align: justify;
}
ul:after {
content: "";
display:inline-block;
width:100%;
}
ul li {
list-style: none;
display: inline-block;
}
<ul><li>Foo</li><li>Bar</li><li>Baz</li></ul>
<ul>
<li>Foo</li>
<li>Bar</li>
<li>Baz</li>
</ul>
Run code<li>in the first it is <ul>not distributed correctly, because it <li>does not have spaces at the end of tags <li>, is it possible to have distribution using text-align: justifywhen html is one line without spaces? Is this possible without flexbox?
I tried to add ul li:after, but that didn't work.
source
share