XML technologies / CSS / Advanced websites with CSS / Text effects and cascading / Cascading and inheritance in CSS
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
The “C” in CSS stands for “cascading”. Cascading has played little part in the chapters and examples so far; now we will examine it closely. All elements on a web page obey the cascade. The following examples explain it mainly through simple, clear text elements.
Inheritance has effects somewhat similar to cascading, but they are entirely different CSS processes. Cascading determines which properties apply when several rules assign values to an element. Inheritance controls how properties pass from parent to child elements.
This sounds complicated but is not. In practice, the two are easy to distinguish. Several simple examples will clarify the difference; then we will examine cascading more closely.
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg
back to top