A Word About Cascading


A fundamental feature of CSS is that more than one style sheet can influence a document's presentation. This feature is known as cascading because the different style sheets are thought of as coming in a series. Cascading is a fundamental feature of CSS, because we realized that any single document could likely end up with style sheets from multiple sources: the browser, the designer, and possibly, the user.

In the last set of examples, you saw that the text color of the links turned blue without the style sheet specifying it. Also, the browser knew how to format BLOCKQUOTE and H1 elements without being told so explicitly. Everything that the browser knows about formatting is stored in the browser's default style sheet and is merged with author and user style sheets when the document is displayed.

For years, we have known that designers want to develop their own style sheets. However, we discovered that users also want the option of influencing the presentation of their documents. With CSS, they can do this by supplying a personal style sheet that merges with the browser's and the designer's style sheets. Any conflicts between the various style sheets are resolved by the browser. Usually, the designer's style sheet has the strongest claim on the document, followed by the user's, and then the browser's default. However, the user can say that a rule is extremely important, and it then overrides any author or browser styles.

We detail cascading in Chapter 13. Before that, there is much to learn about fonts, space, and colors.



Cascading Style Sheets(c) Designing for the Web
Cascading Style Sheets: Designing for the Web (3rd Edition)
ISBN: 0321193121
EAN: 2147483647
Year: 2003
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net