Is there a way to achieve not applying margin-right
to the last li
, in this specific condition?
I am looking for a pure CSS solution that is compatible with IE6 and 7, without altering the existing HTML. Can this be done?
ul li {display:inline;margin-right:10px}
<ul id="nav">
<li><a href="#nowhere" >Lorem</a></li>
<li><a href="#nowhere" >Aliquam</a></li>
<li><a href="#nowhere" >Morbi</a></li>
<li><a href="#nowhere" >Praesent</a></li>
<li><a href="#nowhere" >Pellentesque</a></li>
</ul>