again: an IE fault (/fart)

windows

Guest
i have this code :


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Page title</title>
<style type="text/css">
body{
padding: 0px;
margin: 0px;
background-color: white;
font: normal 13px arial, sans-serif;
color: black;
}

#navcontainer{
height: 21px;
margin-top: 3px;
border: solid #EEB695;
border-width: 1px 0px;
padding-right: 10px;
}

#navcontainer ul
{
list-style: none;
padding: 0;
margin: 0;
}

#navcontainer ul li {
display: inline;
}

#navcontainer ul li a {
display: block;
height: 19px;
margin: 0px 1px;
padding: 0px 20px 0px 28px;
float: right;
font: bold 14px arial, sans-serif;
text-decoration: none;
}

#navcontainer ul li a:hover{
border: solid #AF4F15;
border-width: 1px;
margin: 0px;
}

/* IE hack for right button */
/*#navcontainer ul li a.lll:hover{
margin-left: 1px;
}
#navcontainer>ul li a.lll:hover{
margin-left: 0px;
}*/

</style>
</head>
<body>


<div id="navcontainer">
<ul>
<li><a href='http://www.webdeveloper.com/forum/archive/index.php/#' class="lll">aaaaa</a></li>
<li><a href='http://www.webdeveloper.com/forum/archive/index.php/#'>bbbbb</a></li>
<li><a href='http://www.webdeveloper.com/forum/archive/index.php/#'>ccccccc</a></li>
</ul>
</div>
</body>
</html>


(this is a simplified version of it without images)
(it is align to right kuz i work in hebrew)

and the problem: the most right button in IE !!
hover it and see for yourself. it is only the most right button the rest are good.
FF is good also !

i've done a IE hack to fix it... un-comment the the to see the fix.

what is the reason for this fault?
whats the best way to fix it?can you assign a width to your li tags?
#navcontainer ul li {
display: block;
width: 10em;
float: right;
}no..
thanks but - no fixed width !Control the text 'movement' with padding and use a border in both states of the buttons.
#navcontainer ul li a {
display: block;
height: 18px;
border:1px solid #fff;
margin: 0px;
padding: 0px 20px 1px 28px;
float: right;
font: bold 14px arial, sans-serif;
text-decoration: none;
}

#navcontainer ul li a:hover{
border:1px solid #AF4F15;
padding: 1px 20px 0px 28px;
}mmmm...
NOPE !

i cant have a border:1px solid #fff; in the link normal position because i got a background image and the border is seen !Just use padding and no margin:#navcontainer ul li a {
display: block;
height: 19px;
padding: 0px 21px 0px 29px;
float: right;
font: bold 14px arial, sans-serif;
text-decoration: none;
}

#navcontainer ul li a:hover{
padding: 0px 20px 0px 28px;
border: solid #AF4F15;
border-width: 1px;
}grrrrrrrrrr.. stupid me
THANKS!!
the best sulotion is the simplest one.
 
Back
Top