PDA

View Full Version : Active pseudo?



dazd
Feb 29th, 2012, 12:04 AM
Hey all,

I am trying to use an active pseudo looks like this



.side-nav-custom ul a:active {
color: #00b7e5;
}


However, it's not working :( what am I doing wrong?
Also gave it a hover pseudo and that works, but it seems I can't ever get the active pseudo to work. Am I doing something wrong?

VIPStephan
Feb 29th, 2012, 01:29 AM
What exactly isn’t working? :active is the state while the element is being clicked, i. e. while you hold your mouse button down.

dazd
Feb 29th, 2012, 03:05 AM
I thought the active pseudo showed you what menu you are in?
So say for a top nav menu color is white and has a pseudo of active and color blue, when you clicked on it and are on that page it shows that top nav menu blue. But when you click on another menu in the top nav it goes back to white and then shows the other one as blue.
Is that now correct?


What exactly isnít working? :active is the state while the element is being clicked, i. e. while you hold your mouse button down.

felgall
Feb 29th, 2012, 08:43 AM
To trigger :active you need to either first trigger :hover with the mouse cursor and then depress a mouse button OR first trigger :focus and then depress the enter key.

It tells you that the link is actually active and that when you release the button or key you will be taken to the page the link goes to (unless you move the mouse to undo the :hover or give something else the :focus first.

abduraooft
Feb 29th, 2012, 09:33 AM
I thought the active pseudo showed you what menu you are in?
See http://www.codingforums.com/showpost.php?p=605564&postcount=3