Forums

This topic is locked

Change color of href

Posted 06 Jan 2003 17:32:14
1
has voted
06 Jan 2003 17:32:14 Ronald Ramp posted:
I have got a problem. I have got some code which generates a menu from an array. Now i want to change the color of the active link and when i click another link it has to be change to a default color. It has to be random and without layers.

Is there away to reset the visited link to the default link. A page reload isn't a problem

Are there specific eventhandler? Or can anyone help me a little bite on the way.

thanks

Replies

Replied 19 Jan 2003 10:43:02
19 Jan 2003 10:43:02 tim jamers replied:
Hey i don't know if your familiar with CSS but with CSS this is posible...
Lets say the deafault collor of your link is black and when you click on it(active) it turns gray. if you click on an other link the link you just visited should turn back to black and the other link you clicked has to turn back to red...
Here is the CSS code to do this.
Enjoy!

A:link { color: black } /* default link */
A:visited { color: black } /* link that you already visited */
A:active { color: red } /* active link */

Reply to this topic