views:

35

answers:

1

So I know how to control what happens when you hover over a link, and after you have pressed a link. But my question is how do you change a link after you have clicked another link?

For example, you click "Profile" on Facebook. The "profile" box is highlighted after you've clicked it. Then you click "home" and the "profile" box goes back to normal. How do you make a link go back to normal after you have clicked another link?

A: 

There are 4 conditions while styling a link via CSS:

a:link : Unvisited link a:visited : Visited link a:hover : Mouse over link a:active : Selected link

You can use this conditions to create the same effect as Facebook's.

Remember to declare ALL of this for every link you create. Be careful about the order. First condition must be link, then visited, then hover and then active.

scaryguy