...

View Full Version : Overriding the background-color in a:hover



loamguy1
11-04-2008, 05:57 PM
I'm having a CSS override property issue:

I'm using a white text color over a black background color when a user hovers over an href link:


#main a:hover {
text-decoration:none;
color:#ffffff;
background-color:#000000;
}

However, within the main DIV, in another DIV, if I try and override the background-color to none when the user hovers over a link, it doesn't work. The background color is still black:


#main .bigcdimg a:hover {
background-color:none;
}

The odd thing is that if I supply a color, such as white, for the background-color in the .bigcdimg DIV above, the background-color on a hover IS white. It just doesn't seem the handle the "none" property.

Am I missing something obvious, or is this a CSS quirk?

itsallkizza
11-04-2008, 07:14 PM
use


background-color: transparent;
/* or */
background-color: #ffffff; /* some color */

none is not a valid value

loamguy1
11-04-2008, 07:27 PM
use


background-color: transparent;
/* or */
background-color: #ffffff; /* some color */

none is not a valid value

Gold! That did it. Thanks much!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum