Quote:
Originally Posted by HarryT
Absolutely - that's exactly the way to do it. That's why they're called cascading style sheets, because each new style modifies the previous ones. If you have a "paragraph" style, which indents paragraphs, and you want a style for "initial paragraph" with no indent, simply specify the lack of indentation as a modification to the normal paragraph style; don't duplicate the entire style.
|
This is slightly different from the use of two style sheets on the same element. The cascading bit means that an element inherits all applicable styles, with the specific overriding the generic.
So a paragraph <p class="first"> inherits any style set on body, any enclosing div or other block, the generic paragraph style definition and only then the class "first".