In the following table, we list in alphabetical order all the properties defined in the World Wide Web Consortium's Recommended Specification for Cascading Style Sheets, Level 1 (http://www.w3.org/pub/WWW/TR/REC-CSS1).
TIP
We know that browser support of style sheets will change faster than we can reprint this book, so we have created a separate "compliance document" that you can use to determine how style sheets are implemented by the latest releases of the browsers. You can find this document at http://www.oreilly.com/catalog/html4/. Whenever that document and this appendix differ, the document should be considered more accurate. In this printing, we cover Netscape Navigator 4.7 and Internet Explorer 5.0.
As in other sections of this book, we use the Netscape and Internet Explorer icons to the far right of each property to show which browser supports that property. Properties with no icons are not currently supported by any browser. We also include the number of the section in this book that fully defines the property.
We include each property's possible values, defined as either an explicit keyword (shown in constant width) or as one of these values:
Either a color name or hexadecimal RGB value, as defined in Appendix G, "Color Names and Values", or an RGB triple of the form:
rgb(red, green, blue)
where red, green, and blue are either numbers in the range to 255 or percentage values indicating the brightness of that color component. Values of 255 or 100% indicate that the corresponding color component is at its brightest; values of 0 or 0% indicate that the corresponding color component is turned completely off. For example:
rgb(27, 119, 207) rgb(50%, 75%, 0%)
are both valid color specifications.
An optional sign (either + or -) immediately followed by a number (with or without a decimal point) immediately followed by a two-character unit identifier. For values of zero, the unit identifier may be omitted.
The unit identifiers em and ex refer to the overall height of the font and to the height of the letter "x", respectively. The unit identifier px is equal to a single pixel on the display device. The unit identifiers in, cm, mm, pt, and pc refer to inches, centimeters, millimeters, points, and picas, respectively. There are 72.27 points per inch, and 12 points in a pica.
An optional sign, immediately followed by a number (with or without a decimal point).
An optional sign, immediately followed by a number (with or without a decimal point), immediately followed by a percent sign. The actual value is computed as a percentage of some other element property, usually the element's size.
The keyword url, immediately followed (no spaces) by a left parenthesis, followed by a URL optionally enclosed in single or double quotes, followed by a matching right parenthesis. For example:
url("http://members.aol.com/htmlguru")
is a valid URL value.
Finally, some values are lists of other values and are described as a "list of" some other value. In these cases, a list consists of one or more of the allowed values, separated by commas.
If there are several different values allowed for a property, these alternative choices are separated by vertical bars (|).
If the standard defines a default value for the property, that value is boldfaced.
Composite property for the background-attachment,background-color, background-image, background-position, and background-repeat properties; value is any of these properties' values, in any order |
|
|||
scroll | fixed |
Determines if the background image is fixed in the window or scrolls as the document scrolls |
|||
color | transparent |
Sets the background color of an element |
|
||
url | none |
Sets the background image of an element |
|
||
percent | length | top | center | bottom | left | right |
Sets the initial position of the element's background image, if specified; values are normally paired to provide x, y positions. Default position is 0% 0% |
|||
repeat | repeat-x | repeat-y | no-repeat |
Determines how the background image is repeated (tiled) across an element |
|
||
Sets all four borders on an element; value is one or more of a color, a value for border-width, and a value for border-style |
|
|||
border-bottom |
Sets the bottom border on an element; value is one or more of a color, a value for border-bottom-width, and a value for border-style |
|||
length | thin | medium | thick |
Sets the thickness of an element's bottom border |
|
||
color |
Sets the color of all four of an element's borders; default is the color of the element |
|
||
border-left |
Sets the left border on an element; value is one or more of a color, a value for border-left-width, and a value for border-style |
|||
length | thin | medium | thick |
Sets the thickness of an element's left border |
|
||
border-right |
Sets the right border on an element; value is one or more of a color, a value for border-right-width, and a value for border-style |
|||
length | thin | medium | thick |
Sets the thickness of an element's right border |
|
||
dashed | dotted | double | groove | inset | none | outset | ridge | solid |
Sets the style of all four of an element's borders |
|
||
border-top |
Sets the top border on an element; value is one or more of a color, a value for border-top-width, and a value for border-style |
|||
length | thin | medium | thick |
Sets the thickness of an element's top border |
|
||
length | thin | medium | thick |
Sets the thickness of all four of an element's borders |
|
||
both | left | none | right |
Sets which margins of an element must not be adjacent to a floating element; the element will be moved down until that margin is clear |
|
||
color |
Sets the color of an element |
|
||
block | inline | list-item | none |
Controls how an element is displayed |
|
||
left | none | right |
Determines if an element will float to the left or right, allowing text to wrap around it, or be displayed inline (using none) |
|
||
Sets all the font attributes for an element; value is any of the values for font-style, font-variant, font-weight, font-size, line-height, and font-family, in that order |
|
|||
list of font names |
Defines the font for an element, either as a specific font or as one of the generic fonts serif, sans-serif, cursive, fantasy, and monospace |
|
||
xx-small | x-small | small | medium | large | x-large | xx-large | larger | smaller | length | percent |
Defines the font size |
|
||
none | ratio |
Adjusts the current font aspect ratio |
|||
wider | normal | narrower | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded |
Determines the amount to stretch the current font |
|||
normal | italic | oblique |
Defines the style of the face, either normal or some type of slanted style |
|
||
normal | small-caps |
Defines a font to be in small caps |
|||
normal | bold | bolder | lighter | number |
Defines the font weight. If a number is used, it must be a multiple of 100 between 100 and 900; 400 is normal, 700 is the same as the keyword bold. |
|
||
length | auto |
Defines the height of an element |
|
||
length | normal |
Inserts additional space between text characters |
|
||
length | number | percent | normal |
Sets the distance between adjacent text baselines |
|
||
Defines list-related styles using any of the values for list-style-image, list-style-position, and list-style-type |
|
|||
url | none |
Defines an image to be used as a list item's marker, in lieu of the value for list-style-type |
|
||
inside | outside |
Indents or extends (default) a list item's marker with respect to the item's content |
|||
circle | disc | square | decimal | lower-alpha | lower-roman | none | upper-alpha | upper-roman |
Defines a list item's marker for either unordered lists (circle, disc, or square) or for ordered lists (decimal, lower-alpha, lower-roman, none, upper-alpha, or upper-roman) |
|
||
length | percent | auto |
Defines all four of an element's margins |
|
||
length | percent | auto |
Defines the bottom margin of an element; default value is 0 |
|
||
length | percent | auto |
Defines the left margin of an element; default value is 0 |
|
||
length | percent | auto |
Defines the right margin of an element; default value is 0 |
|
||
length | percent | auto |
Defines the top margin of an element; default value is 0 |
|
||
Defines all four padding amounts around an element |
|
|||
length | percent |
Defines the bottom padding of an element; default value is 0 |
|
||
length | percent |
Defines the left padding of an element; default value is 0 |
|
||
length | percent |
Defines the right padding of an element; default value is 0 |
|
||
length | percent |
Defines the top padding of an element; default value is 0 |
|
||
center | justify | left | right |
Set the text alignment style for an element |
|
||
blink | line-through | none | overline | underline |
Defines any decoration for the text; values may be combined |
|
||
length | percent |
Defines the indentation of the first line of text in an element; default value is |
|
||
text-shadow |
See text |
Creates text drop shadows of varying colors and offsets |
8.4.5.6 |
|
capitalize | lowercase | none | uppercase |
Transforms the text in the element accordingly |
8.4.5.7 |
|
|
percent | baseline | bottom | middle | sub | super | text-bottom | text-top | top |
Sets the vertical positioning of an element |
8.4.5.8 |
|
|
length | normal |
Inserts additional space between words |
8.4.5.9 |
||
normal | nowrap | pre |
Defines how whitespace within an element is handled |
|||
length | percent | auto |
|
Copyright © 2002 O'Reilly & Associates. All rights reserved.