...

View Full Version : changing color of a link



theexo51
08-23-2005, 12:25 PM
hi,

i am trying to change the colour of a link using onmouse, trouble is the colour starts off as blue, changes when i go over then goes to black when i roll off.
where do i change the colour of the link?

cheers

mark87
08-23-2005, 12:40 PM
a:link {color: #00F;}
a:active {color: #00F;}
a:hover {color: #000;}
a:visited {color: #00F;}

Tristan Gray
08-23-2005, 12:41 PM
Replace the 'whatevers' with the attribute you wish such as color. Ensure that they are declared in this order.


A:link {
whatever
}

A:visited {
whatever
}

A:hover {
whatever
}

A:active {
whatever
}

theexo51
08-23-2005, 12:51 PM
thanks guys

mrruben5
08-23-2005, 12:52 PM
You can shorthand this.

a {
color: #000;
text-decoration: underline
}
/*the foucs pseudo element is for users that navigate with tab*/
a:hover, a:focus {
color: #c00;
text-decoration: none
}
The style is up to you :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum