Prev | Current Page 67 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"

Values can be expressed as keywords
(p. 29), strings (p. 37), colors (p. 33), numbers (p. 37), lengths (p. 29), percentages
(p. 32), and URIs (p. 38).
Keywords
Many CSS property values can be specified as keywords. A keyword is an identifier
(p. 43), and it mustn??™t be surrounded by quotation marks. So the correct syntax is
background-color: yellow;, whereas background-color: "yellow"; is an error.
See the definition of each property for information about which keywords, if any,
it allows.
Lengths and Units
The value type for many CSS properties is specified as .2 A length is a
measurement comprising a numeric value and a unit only??”whitespace can??™t appear
between the number and the unit.
The numeric value can be either an integer or a real number. If the numeric value
is 0, the unit can be omitted (after all, zero pixels is the same measurement as zero
millimeters).3 But if the value isn??™t zero, the unit must be specified.4
The units in which length is measured can be either relative or absolute, but an
absolute unit is useful only if the physical properties of the output medium are
known.


Pages:
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79