HTML+CSS: Horizontal Menu

Associate
Joined
10 Jul 2006
Posts
2,423
I used to know the reason why I did this but I have now forgotten.

For as long as I can remember when creating a horizontal menu I do something like this:

Code:
<ul>
    <li style="display:inline"><a style="float:left">Menu item</a></li>
    ...
</ul>

Why do I put the "float:left" as well as the "display:inline"? I know there is/was a reason for it, but I can't remember what it was?

Also, are people using inline-block these days or not due to compatibility issues in IE6/IE7?
 
'display:inline' fixes the double margin bug on floated elements in ie6.
 
Back
Top Bottom