PDA

View Full Version : Brain fart!! a.menu:hover{}



udjamaflip
Mar 12th, 2008, 02:29 PM
Hi,

I cant find or remotely remember the word I am after and I just need the poke in the rite direction! :)



a.menu:hover {
stuff here
}
a.menu {
stuff here
}


I'm after the a.menu:***** for when that link is the current page.

Like the topic says major brain fart, 1 word answer will suffice nicely! :)

Donkey
Mar 12th, 2008, 03:31 PM
Personally I wouldn't use a class called "menu" I would put the links inside a div called menu and code as follows:


#menu a,
#menu a:link,
#menu a:visited{
normal styles go here
}

#menu a:focus,
#menu a:hover{
hoverstyles go here
}

#menu a:active
{
active styles go here
}
The css for the links should be in that order or they can cancel each other out due to incorrect cascading.

You can remember the order with
Luke Vader Former Handle Aanakin

"Focus" is important for people who navigate using the keyboard.

I nearly always combine the "active" state with "Focus" and "Hover" because IE 6 sometimes seems to mix up focus and active.

abduraooft
Mar 12th, 2008, 03:35 PM
http://www.codingforums.com/showthread.php?t=107357