On 29/05/2009, at 12:13 PM, Wade Smart wrote:
>
> #navlist a:link, #navlist a:visited {
> background-color:#3173B1;
> color:#FFFFFF;
> text-decoration:none;
> }
>
> .active { background-color: #555555;}
>
> I have tried adding #navlist and various pre elements to teh .active
> but
> I just cant seem to get the background to change when its active.
The problem is with the specificity of your rules. Your first rule
targets an id and has pseudo classes ('link' and 'visited') which has
more specificity than your active class. To make your rule work you
need to make it more specific. e.g.
#navlist li.active a:link, #navlist li.active a:visited {
background-color: #555;
}
Google for CSS specificity for more info.
>
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/