Code:
ul#menu li {
font-size: 25px;
height: 35px;
float: left;
display: inline; /* IE 6 */
margin: 0 10px 0 0;
padding: 0;
}
Inline elements cannot have specified dimensions. Thus, if you want to specify the height, get rid of the
display: inline declaration. Fortunately, that declaration doesn’t seem to be doing anything here except wasting space since
float: left overrides it; floated elements are block‐level regardless of the
display property’s value.
Code:
ul#menu li a {
padding: 2px 5px 5px 5px;
color: #FF0000;
text-decoration: none;
display: inherit;
height: 32px;
}
I’m guessing that this is supposed to be some kind of exploit for Internet Explorer? I would avoid exploits that aren’t forward compatible. Use
conditional comments if you have to.
Anyway, the solution seems to be to float the anchor elements to the left. I’d put a border around the
div or
ul elements though so that you can see the resulting issue: the height is not large enough to accommodate your text, resulting in different cross‐browser appearances between Firefox and Internet Explorer 6. Internet Explorer 7 looks the same as Firefox, however.