XML technologies / CSS / Advanced websites with CSS / An initial overview / Types of CSS rules / Which properties and elements can CSS affect?
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
Which properties can CSS rules affect?
CSS rules can include any property relating to the presentation of information on a web page. A complete list is available under CSS property reference.
Which elements can CSS affect?
In other words, “How precisely can a CSS rule define the appearance of a particular place on a page?” CSS lets designers define a design for every paragraph, but how can that effect be limited to one selected paragraph? Is that even possible?
The answer is yes. By combining selectors in different ways, designers can specify very precise conditions for applying a style rule. For example, rules can target:
all elements of a particular type,
all elements of a particular type belonging to a particular group or class,
all elements of a particular type contained in other elements of a particular type,
all elements of a particular type contained in other elements of a particular type and also belonging to a particular group or class,
all elements of a particular type immediately following an element of another type,
one element of a particular type assigned a unique ID.
See Selectors and CSS rule structure for a detailed description of all selectors available for specific targeting.
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