Forum Moderators: not2easy

Message Too Old, No Replies

Firefox 3, problem with changing text colour when hovering over a div

         

thoughton

1:25 pm on Jul 3, 2008 (gmt 0)

10+ Year Member



Hi folks, hopefully someone can point me in the right direction here :)

I'm using hover to change the background image of a div in this way:

#col1 {
color: gray;
background: #d9dbdd url(../_images/image-light.png) no-repeat;
}

#col1:hover {
color: white;
background: #a1a5a8 url(../_images/image-dark.png) no-repeat;
}

#col1:hover a:link{
color: white;
}

#col1:hover a:hover{
color: #a71d6d;
}

What is supposed to happen is that the div starts as a light background box containing gray links. When the pointer rolls over it becomes a dark background box with white links. When the pointer rolls over the links the links turn purple (the box remains dark).

This works in Safari. In Firefox 3 the background changes with hover, but the links to not change from gray to white. Any ideas? Thanks!

thoughton

2:56 pm on Jul 3, 2008 (gmt 0)

10+ Year Member



Nevermind everyone :) It was just me being dumb, hadn't defined an a:visited colour...

eelixduppy

2:57 pm on Jul 3, 2008 (gmt 0)



hehe, glad you got it working :)