/    Sign up×
Community /Pin to ProfileBookmark

Background Color which spoils the design

hi

I’ve got a little problem with my menu : I assigned a background-color property with my a:hover. The link is inside a list. With Firefox it’s just perfect, but it’s not that good with IE : when the cursor is over the link, the menulist moves a few centimeters to the left ! Without the background-color property, it just stays quiet at its own place. Can you explain/solve this, cause I don’t understand ?

the site : [url]http://swingfiler.bleuarff-corp.info/test/index.php[/url] (it’s in french, but you don’t have to understand the text to see the problem :p )
the stylesheet : [url]http://swingfiler.bleuarff-corp.info/test/styles/design.css[/url]
And the concerned part:

[CODE]#leftmenu{
position : absolute;
left : 0%;
top : 0%;
width : 17%;
max-width : 17%;
padding : 0.5% 0% 1% 3%;
margin : 0em;
border : 1px solid red;
}

#leftmenu, .menuliste{
font-size : medium;
font-weight : bold;
}

.menuliste{
width : 90%;
margin : 0em;
padding : 0em;
list-style-image : none;
list-style-type : none;
/* padding-left : 0%;*/
border : 1px solid green;
}

.menuliste li{
display: inline;
}

.menuliste a{
color : black;
display: block;
text-decoration: none;
margin : 0em;
padding : 0em;
}

.menuliste a:visited{
color : black;
}
.menuliste a:hover{
background-color: orange;
text-decoration: none;
color : black;
margin : 0em;
padding : 0em;
}[/CODE]

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@toicontienDec 27.2005 — In IE-Win, when things move around on mouse over, it's usually because some element needs the HasLayout DOM property triggered. In your case, I'd first trying positioning the <a> tags in your left menu relatively. If that doesn't work, try setting the height of the <a> tags to 1px:
<i>
</i>.menuliste a{
color : black;
display: block;
text-decoration: none;
margin : 0em;
padding : 0em;
position: relative;
}

/* ...OR... */
.menuliste a{
color : black;
display: block;
text-decoration: none;
margin : 0em;
padding : 0em;
/**/height: 1px;/* For IE-Win */
}

/* For standards browsers */
html&gt;body .menuliste a{
height: auto;
}


If that doesn't cure the problem, the <li> tags or <ul> tag could be the problem. In fact, you can remove the display: inline; for the left menu's LI tags and adjust your markup: http://www.webdeveloper.com/forum/showthread.php?p=466092#post466092
Copy linkTweet thisAlerts:
@BleuarffauthorDec 29.2005 — Well, I tried all that you said and what is said on the linked thread, but that doesn't make it better. I applied a height, width or position to every element of the menu in order to create a layout in IE, but that doesn't change the result a single bit, it still moves when the cursor is over.

I've been fighting this bug for the last 4 or 5 days, i'm feeling a bit discouraged ? ... Any idea, anyone ?
×

Success!

Help @Bleuarff 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.16,
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,
)...