XML technologies / CSS / CSS Cookbook / General topics / CSS properties
(Excerpt from “CSS Kochbuch” by Christopher Schmitt)
Problem
You want to learn more about CSS properties.
Solution
This chapter’s recipes use common properties such as color, font-family, font-size and text-decoration. Properties appear between braces. Each property name is followed by a colon and its values, as this general example shows:
Selektor {
Eigenschaft: Wert;
}A practical example might look like this:
li {
list-style-type: square;
}Whenever the element li appears in the document, its list marker is a square rather than the default circle.
Discussion
Selectors determine which document elements receive the styles. Properties and values determine which parts of an element change and how.
The property color, for example, specifies that an element’s color should change, but does not specify the color itself: that is the value’s job. The following table shows properties, values and their effects.
Table: A short list of CSS properties.
Property | Value | Result |
|---|---|---|
|
| Displays bold text. |
| Color name or hexadecimal HTML value | Sets a border’s color. |
|
| Displays the border as a solid line. |
|
| Aligns text to the left. |
See also
The complete W3C property table,
German property list on Stefan Münz’s selfhtml site,
Detailed discussion of the property
borderin the recipe Page borders andComplete list of CSS properties under CSS 2.1: properties and proprietary extensions.
Copyright of the German edition © 2007 by O’Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from “CSS Kochbuch” 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.
O’Reilly Verlag GmbH & Co. KG, Balthasarstr. 81, 50670 Köln