[thelist] Nesting CSS Classes...Why??

Joel Canfield Joel at spinhead.com
Sun Mar 3 01:09:01 CST 2002


>What is the need of a second class if it inherits the
>attributes of the first?.

To allow a specialized version of the parent class without having to
re-specify all the attributes of that parent.

First class sets, f'rinstance, font-size, position, color, whatever. Second
class may or may not set any or all of those attributes. If it sets a color,
it can inherit the size and position of its parent; if it sets size, it
inherits the other attributes, etc.

So, I want a section to be all sans-serif, but in the middle, I want a
section to be blue, not the default black. The blue section inherits the
sans-serif font-family, but sets its own color.

It's late and I just got back from a friend's 25th anniversary party, so I'm
just the tiniest bit fuzzy. If that doesn't make sense (or if I'm just plain
wrong :) lemme know.

spinhead



More information about the thelist mailing list