XML technologies / ePUB / CSS essentials / Selectors
(Excerpt from “E-Books mit ePUB ─ Von Word zum E-Book mit XML” by Dr. Victor Wang)
A selector defines the context in which a CSS instruction applies. The simplest is an element selector matching the element name. Other types follow in the table.
Selector | Example | Meaning |
|---|---|---|
Standard selectors | ||
Element selector |
| All |
Universal selector |
| All elements have spacing set to 0 |
Class selector |
| All |
ID selector |
| The |
|
| All elements with ID attribute |
Attribute selector |
| All |
|
| All |
Advanced selectors | ||
Descendant selector |
| All |
|
| |
Child selector |
| All |
Adjacent sibling selector |
| All |
Table: CSS selectors
Copyright © mitp 2011
You may print the online version for your private use.
Otherwise, this chapter from “E-Books mit ePUB” is subject to the same terms as the printed edition: the work and all its parts are protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Verlagsgruppe Hüthig Jehle Rehm GmbH, Im Weiher 10, 69121 Heidelberg, kundenbetreuung(at)hjr-verlag.de
back to top