April 1st, 2003, 11:25 AM
-
Text color on hover with CSS.
This is the code I have,
Code:
body {
color: #000000;
}
a:link {
color: #000000;
text-decoration: none;
}
a:active {
color: #ffffff;
text-decoration: none;
}
a:hover {
color: #ffffff;
background-color: #000000;
text-decoration: none;
}
a:visited {
color: #000000;
text-decoration: none;
}
.left {
background-color: white;
}
.right {
background-color: black;
color: white;
}
I want the text to turn white on hover but it won't.
Any suggestions?
http://htp.360viewonline.com
Massassian
I did RTFM but I'm a total newb so some of it didn't make sense.

April 1st, 2003, 02:08 PM
-
A:link { color: red } /* unvisited links */
A:visited { color: blue } /* visited links */
A:hover { color: yellow } /* user hovers */
A:active { color: lime } /* active links */
Note that the A:hover must be placed after the A:link and A:visited rules, since otherwise the cascading rules will hide the 'color' property of the A:hover rule. Similarly, because A:active is placed after A:hover, the active color (lime) will apply when the user both activates and hovers over the A element.
Try changing the order of your code.
April 1st, 2003, 03:02 PM
-
Massassian
I did RTFM but I'm a total newb so some of it didn't make sense.
