Forum Moderators: not2easy
<html>
<head>
<title>Untitled Document</title>
<style type="text/css">
#right-menu{
position:absolute;
top:150px;
right:0;
}
#nav{
margin:0;
padding:0;
list-style-type:none;
}
#nav li{
margin:0;
padding:0;
background:#fff url("../images/nav-bullet.gif") left no-repeat;
}
#nav li a{
display:block;
text-decoration:none;
font-size:18px;
font-family:"Trebuchet MS";
margin:0;
padding:7px 40px;
background:transparent url("../images/nav-button.gif") right no-repeat;
}
#nav li a:hover{
background:transparent url("../images/nav-hover.gif") right no-repeat;
}
</style>
</head>
<body>
<div id="right-menu">
<ul id="nav">
<li><a href="page1.html">Menu Item One</a></li>
<li><a href="page2.html">Menu Item Two</a></li>
<li><a href="page3.html">Menu Item Three</a></li>
<li><a href="page4.html">Menu Item Four</a></li>
</ul>
</div>
</body>
</html>
#nav li displaying (by default) as list-item, and #nav li a set (by author) as block. This creates an extra line below the anchor in IE 6, it's a bug :) It's most easily fixed by just setting
#nav li to display inline, but it means your background property probably won't work all that well, since the li would then take up one line, and if you needed it positioned farther down vertically, it can't. I believe either SuzyUK or Robin_reala had another fix for this, not involving changing the display type - but I'm sorry, for the life of me I can't remember what that was :)
Umm... try either
height: 1px for IE 6 only (use conditional commented stylesheets) or maybe setting line-height to the exact height of the block-level anchor inside it :)
Would that be putting all the <li></li>'s on one line?
Hehehe nah, I never liked that solution, it was always so messy and difficult to maintain.
I think it had to do with setting the height or line-height properties, but since I'm at home I'm on a Mac, so I'd need to be at work to get at IE 6 to test :)
I've given the "#nav li a" a set width in pixels, taken out the 40px padding on the sides and put it on the "#nav li". The space between the list items has gone, only this way the nav-bullet.gif background isn't part of the clickable link anymore, but I can live with that!