Forum Moderators: not2easy

Message Too Old, No Replies

Hover link problem

         

awshucks

5:57 am on Nov 19, 2003 (gmt 0)

10+ Year Member



Here's the code relating to my problem:

A:link {color:#4682B4; text-decoration:none}
A:active {color:#4682B4; text-decoration: none}
A:hover {color:white; text-decoration: none; font-weight:bold; background:#4682b4}
A:visited {color:#4682B4; text-decoration: none}

As you can see, all my links are this blue colour except for when it's in hover mode. Everything works except that in hover mode, the link text colour doesn't change to white. It stays the blue colour and with the link background being blue as well, it's just one big blue rectangle.

If anyone has any help/suggestions on how I can get the code working properly, I'd appreciate it. Thanks!

DaScribbler

6:15 am on Nov 19, 2003 (gmt 0)

10+ Year Member



Try moving the :hover so that it comes AFTER :visited. That's bitten me before.

Both of them are siblings (they inherit from the same parent), and since :visited is defined last, it's more important according to the CSS rules.

awshucks

6:36 am on Nov 19, 2003 (gmt 0)

10+ Year Member



Ooh, thank you so much! That did the trick.

awshucks

6:57 am on Nov 19, 2003 (gmt 0)

10+ Year Member



Edited: Nevermind. I apparently can't read code properly this late at night.