For a horizontal menu i want to justify the list items over the full width.
This works:
CSS:
ul {height: 1em;text-align: justify;overflow: hidden;padding-left: 0;}
li {display: inline-block;}
li:last-child {padding-left: 100%;}
HTML:
<ul>
<li>flexible number</li>
<li>and length of</li>
<li>list items</li>
<li>hidden</li>
</ul>
OUTPUT (the lines are showing the width of the UL):
|flexible number and length of list items|
If i delete all whitespaces and linebreaks to minify the HTML-output, it doesn't work any more.
SMALLER HTML:
<ul><li>flexible number</li><li>and length of</li><li>list items</li><li>hidden</li></ul>
It looks like this:
|flexible numberand length oflist items |
Is there any chance to get the "normal" behavior back with pure CSS?
Please have a look at this fiddle: http://jsfiddle.net/Tfranz/HpP99/