Forum Moderators: open

Message Too Old, No Replies

Changing link color on hover?

Onmouseover help

         

artistvrd

6:15 pm on Jun 7, 2006 (gmt 0)

10+ Year Member



I know that this might be weird for me asking something so 'simple' but I just cannot figure out how to change my text's color when hovered over and visited. can anyone please lead me in the right direction?

thanks!
artistvrd

eelixduppy

6:18 pm on Jun 7, 2006 (gmt 0)



>>>when hovered over and visited
Are you talking about links? If so, this can be accomplished in the body tag:
<body link="#000000" alink="#000000" vlink="#000000">

artistvrd

6:29 pm on Jun 7, 2006 (gmt 0)

10+ Year Member



yes it's for links, i tried what you said and I kinda got it, but which ove's the hover one?

Fotiman

7:34 pm on Jun 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This is presentational, therefore should be done with CSS instead of with body attributes.

Add this to the head of your document (a better solution would involve storing this in a separate .css file and including it, but I'm going for simplicity here):

<style type="text/css">
a:link { color: #0000ff; }
a:visited { color: #00ff00; }
a:hover { color: #ff0000; }
a:active { color: #ff00ff; }
</style>

Note, links are only "active" when you are in the process of clicking them. That is, "active" does not mean "if this link is the current page, highlight it differently".

Hope this helps.

artistvrd

8:49 pm on Jun 7, 2006 (gmt 0)

10+ Year Member



yeah it does thanks!

artistvrd

8:25 pm on Jun 10, 2006 (gmt 0)

10+ Year Member



umm, no one might see this, but is there a way to get links to be links, then be underlined when hovered over? I've seen it around, but I can't get it and I've searched and searhced and you great people here always seem to answer it!

thanks in advance!
artistvrd

abbeyvet

8:36 pm on Jun 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<style type="text/css">
a:link { color: #0000ff; text-decoration:none; }
a:visited { color: #00ff00; }
a:hover { color: #ff0000; text-decoration:underline; }
a:active { color: #ff00ff; }
</style>