PDA

View Full Version : Text links that change color


Ken Rogers
10-21-2005, 03:36 PM
Here's a question that I'm sure has been answered, although I searched and found nothing:

How do I make a text link change color on mouseover? Example: Move your mouse over the links at the top of this page and you'll see what I'm after.

Kenny

Creative Insanity
10-21-2005, 05:45 PM
Use a css file.

a:hover {
color : #A75C3F;
text-decoration : none;
}

Ken Rogers
10-21-2005, 05:51 PM
Thank you for that. My Javascript is a little weak. Could you clarify -- am I supposed to paste this into a CSS file, then simply attach the file and apply the style? What field controls the colors before and during mouseover?

Thanks a big bunch.

Ken

Ken Rogers
10-21-2005, 07:09 PM
I've figured it out! :)

Creative Insanity
10-21-2005, 07:28 PM
Good you worked it out.

You can set up your first text color with a css also and name it something like.

.pagetext {
color : #A75C3F;
text-decoration : none;
}

and then have the one I posted earlier and then just apply the css file to the pages you want that to work on.
Also for the text-decoration you can have underline, overline or none.
You can also setup the font you want to use in those tags.