At 06:11 PM 2/17/2006, Erin Spangler wrote:
>I've tried using a class like this one:
>
>.current {
>   color: #fff;
>   background: #800000;
>}
>But because of inheritance or some reason, it's not showing up.


At 07:24 PM 2/17/2006, francky wrote:
>#left-top-nav li .current a { color: #fff; background: #800000; }
...
><div id="left-top-nav">
><ul>
><li class="first"><a href="begin-here.html">Where do I begin?</a></li>
><li><a href="prices-plans.html">Prices and Plans</a></li>
><li class="current"><a href="sample-pages.html">Sample Pages</a></li>
...


francky, I think you mean li.current not li .current

Erin, it's impossible to be sure without seeing exactly where in your 
stylesheet you've declared .current, but I suspect your problem is 
one of cascade and precedence.  Because of the way a stylesheet's 
rules cascade, a later rule will overrule an earlier rule unless the 
earlier rule has more weight.  Selectors have weight according to the 
number of tag names, classes, and ids they contain, and can gain 
precedence with !important.

Here's an interesting page to read:

CSS 2.1 Specification
6 Assigning property values, Cascading, and Inheritance
http://www.w3.org/TR/CSS21/cascade.html

...that includes the logic and arithmetic for calculating selector precedence:

6.4 The cascade
http://www.w3.org/TR/CSS21/cascade.html#cascade

Regards,
Paul 

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to