Previous Message
Next Message

inheritance problem..... (a solution!)

Sent by Karl Jacobs on 22 October 2004 00:12


On Oct 21, 2004, at 4:04 PM, Bryce Fields wrote:

> On Thu, 21 Oct 2004 15:15:51 -0700, Karl Jacobs [EMAIL-REMOVED]> 
> wrote:
>
>> for my overall site, I am defining the various <hx> in a manner such 
>> as:
>
> *snip*
>
>> The problem is, in one section of the site, I need to apply a 
>> different
>> style to the <hx>.  However, the <div><Hx> declaration that I am using
>> above seems to override any style changes that I add with a <hx
>> class="head">
>>
>> Is there any way of getting the class declaration to work, or is the
>> <div> level control always going to override?......
>
> This may be a stupid question (or maybe I'm not fully understanding
> yours; if that's the case, just ignore this), but your CSS rule
> defining your class is declared after the rule defining your
> descendence (the div Hx rule)?  Last declared rule should take
> precedence.
>


That's what I thought too......   but... it isn't working that way.

since the classes are defined simply as:

..subhead { xxxxxxxxxxxxxx}

they aren't being applied to anything within that

<div id="bodycontent">

but, I just found a solution.....

If I declare the style as so:

#bodycontent .subhead {
xxxxxxxxxxxxxxx
}

Then the styles are applied, overridding the

#bodycontent h3 {xxxxxxxxxxx}

style.


Yeah!!!!  A bit more CSS, but it sure beats updating all those pages  
(~200+)

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: