| Developing with the SDK > Using CSS Syntax in the Style Sheet > The CSS Syntax > Selector |
Selector |
INDEX
PREVIOUS
NEXT
|
The W3C states that "A selector represents a structure. This structure can be understood for instance as a condition that determines which elements in the document tree are matched by this selector, or as a flat description of the HTML or XML fragment corresponding to that structure."
A selector is composed of one or more minimal building blocks. When two or more minimal building blocks are aggregated into a selector, they may be separated by combinators.
A combinator is a single character which semantics is described in Table 3.1. Extra spaces are ignored.
The minimal building blocks of a selector are listed in Table 3.2. For an explanation of the Specificity column, see Priority.
For example, the following line:
P.pastoral.marine { color : green ; size : 10pt ; }
matches <P class="pastoral marine old">, sets the color of the paragraph to green, and sets the font size to 10.
All rules start and end with an implicit " * " pattern. This means that a selector can match anywhere inside the hierarchy.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |