/    Sign up×
Community /Pin to ProfileBookmark

again: an IE fault (/fart)

i have this code :

[QUOTE]

<!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=’#’ class=”lll”>aaaaa</a></li>
<li><a href=’#’>bbbbb</a></li>
<li><a href=’#’>ccccccc</a></li>
</ul>
</div>
</body>
</html>

[/QUOTE]

(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?

to post a comment
CSS

6 Comments(s)

Copy linkTweet thisAlerts:
@DaveSWNov 17.2005 — can you assign a width to your li tags?

#navcontainer ul li {

display: block;

width: 10em;

float: right;

}
Copy linkTweet thisAlerts:
@ofirauthorNov 17.2005 — no..

thanks but - no fixed width !
Copy linkTweet thisAlerts:
@FangNov 17.2005 — 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;
}
Copy linkTweet thisAlerts:
@ofirauthorNov 17.2005 — mmmm...

NOPE !

i cant have a [B]border:1px solid #fff;[/B] in the link normal position because i got a background image and the border is seen !
Copy linkTweet thisAlerts:
@FangNov 17.2005 — 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;
}
Copy linkTweet thisAlerts:
@ofirauthorNov 17.2005 — grrrrrrrrrr.. stupid me

THANKS!!

the best sulotion is the simplest one.
×

Success!

Help @ofir spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...