...

View Full Version : why my css menu is slow?



gddent
12-16-2005, 08:11 PM
hi all,

my website css menu's are very slow, i want to learn this, why my css menu is slow?

i use this css code my menu's;


A.menu {
PADDING-RIGHT: 0px; DISPLAY: block; PADDING-LEFT: 1px; FONT-WEIGHT: bold; FONT-SIZE: 8pt; PADDING-BOTTOM: 1px; MARGIN: 1px 0px 1px 1px; COLOR: #ffffff; PADDING-TOP: 1px; FONT-FAMILY: MS Sans Serif; TEXT-ALIGN: left; TEXT-DECORATION: none
}
A.menu:hover {
BACKGROUND: #FFBD01; COLOR: #FFFFFF
}

And html link code is;


<a class="menu" href="http://www.mysite.com"><b>Home</b></a>

i use following codes and my css menu's slow hovering... (only Internet explorer, no problem with firefox)

i know many website's use css menu's and its very fast, what your suggestions friends?

Thanks, and sorry for bad english.

Osiris
12-17-2005, 02:48 AM
My only guess would be that it's just IE being odd, as it tends to be. It should be working just fine, but I don't really know. If you'd like to give us some sort of link to see what you're talking about, pehaps it would help.

Osiris

jackle
12-17-2005, 12:12 PM
Im not 100% why it's doing that to be honest but i do know that IE doesnt support CSS as much as Firefox so as Osiris says it could just be IE being a pain :)

mark87
12-17-2005, 03:53 PM
IE still supports all the above mentioned CSS. I noticed a few changes you could make though. I'd change it all to this...



a.menu {
display: block;
font: bold 8pt "MS Sans Serif";
margin: 1px 0 1px 1px;
padding: 1px 0 1px 1px;
color: #FFF;
text-align: left;
text-decoration: none;
}

a.menu:hover {
background: #FFBD01;
color: #FFF;
}

_Aerospace_Eng_
12-17-2005, 04:42 PM
Hmm it might be the doctype, I think if its in quirks mode it behaves slowly, though to be honest I see no real difference with your CSS and the way it behaves in both FF and IE, they both seem to be working "fast"

orangeacid
12-17-2005, 10:21 PM
The order in which classes are laid out in CSS matters... it was on w3schools somewhere I think that I read it. I think that classes further down the page have priority over higher ones.

Try re-arranging the orders? I know it might sound a little stupid but apparently it works lol



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum