A Word About Cascading





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.


     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows