This excerpt is from CSS Cookbook, Third Edition.
Learn how to solve the real problems you face with CSS. This cookbook offers hundreds of practical examples for using CSS to format your web pages, and includes code samples you can use right away. You'll find exactly what you need, from determining which aspects of CSS meet the specific needs of your site to methods for resolving differences in the way browsers display it.
This appendix contains several tables. Table B.1, “CSS 2.1 properties” lists CSS properties from W3C’s CSS 2.1 specification (see http://www.w3.org/TR/CSS21). It lists the property’s values, initial value, what the property applies to, whether the values in the property are inherited, whether the property accepts percentages, and the property’s media group.
Table B.2, “Microsoft proprietary extensions to CSS” lists Microsoft’s proprietary extensions to the specifications. These properties will not validate if you run them through a validator and they will appear successfully only in a browser built by Microsoft. Your mileage will vary with the use of these extensions.
As of this writing, Mozilla’s proprietary extensions that are available in Mozilla, Firefox, and Netscape Navigator 6 and later browsers are not fully documented. Table B.3, “Mozilla CSS property extensions” lists some extensions that are documented from Mozilla’s developers’ website. Check the site for a complete list of the extensions, at http://developer.mozilla.org/en/docs/CSS_Reference:Mozilla_Extensions.
Table B.1. CSS 2.1 properties
|
Name |
Values |
Initial value |
Applies to (Default: all) |
|---|---|---|---|
|
|
| ||
|
|
| ||
|
|
| ||
|
|
| ||
|
|
| ||
|
|
See individual properties | ||
|
|
|
| |
|
|
See individual properties | ||
|
|
|
| |
|
|
See individual properties | ||
|
|
See individual properties | ||
|
|
The value of the
| ||
|
|
| ||
|
|
| ||
|
|
See individual properties | ||
|
|
See individual properties | ||
|
|
|
Positioned elements | |
|
|
|
| |
|
|
|
Block-level elements | |
|
|
|
Absolutely positioned elements | |
|
|
Depends on user agent | ||
|
|
|
| |
|
|
| ||
|
|
| ||
|
|
| ||
|
|
|
All elements, but see prose | |
|
|
| ||
|
|
|
| |
|
|
|
All | |
|
|
Depends on user agent | ||
|
|
| ||
|
|
| ||
|
|
| ||
|
|
| ||
|
|
See individual properties | ||
|
|
|
All elements except nonreplaced inline elements, table columns, and column groups | |
|
|
|
Positioned elements | |
|
|
| ||
|
|
| ||
|
|
|
Elements with | |
|
|
|
Elements with | |
|
|
|
Elements with | |
|
|
See individual properties |
Elements with | |
|
|
|
All elements except elements
with table display types other than | |
|
|
|
All elements except elements
with table display types other than | |
|
|
See individual properties |
All elements except elements
with table display types other than | |
|
|
|
All elements except nonreplaced inline elements, table columns, and column groups | |
|
|
|
All elements except nonreplaced inline elements, table rows, and row groups | |
|
|
|
All elements except nonreplaced inline elements, table columns, and column groups | |
|
|
|
All elements except nonreplaced inline elements, table rows, and row groups | |
|
|
|
Block-level elements | |
|
|
| ||
|
|
| ||
|
|
| ||
|
|
See individual properties | ||
|
|
|
Nonreplaced block-level
elements, table cells, and | |
|
|
|
All elements except elements
with table display types other than | |
|
|
See individual properties |
All elements except elements
with table display types other than | |
|
|
|
Block-level elements | |
|
|
|
Block-level elements | |
|
|
|
Block-level elements | |
|
|
| ||
|
|
Depends on user agent | ||
|
|
|
Positioned elements | |
|
|
|
| |
|
|
|
Block-level elements, table cells, and inline blocks | |
|
|
| ||
|
|
|
Block-level elements, table cells, and inline blocks | |
|
|
| ||
|
|
|
Positioned elements | |
|
|
|
All elements, but see prose | |
|
|
|
| |
|
|
| ||
|
|
| ||
|
|
|
Block-level elements | |
|
|
|
All elements except nonreplaced inline elements, table rows, and row groups | |
|
|
| ||
|
|
|
Positioned elements |
| Name |
Values |
Inherited? |
Percentages (Default: N/A) |
Media groups |
|---|---|---|---|---|
|
No |
Visual |
||
|
No |
Visual |
||
|
No |
Visual |
||
|
No |
Refer to the size of the box itself |
Visual |
|
|
No |
Visual |
||
|
No |
Allowed on |
Visual |
|
|
Yes |
Visual |
||
|
No |
Visual |
||
|
Yes |
Visual |
||
|
No |
Visual |
||
|
No |
Visual |
||
|
No |
Visual |
||
|
No |
Visual |
||
|
No |
Visual |
||
|
No |
Visual |
||
|
No |
Visual |
||
|
No |
Refer to height of containing block |
Visual |
|
|
Yes |
Visual |
||
|
No |
Visual |
||
|
No |
Visual |
||
|
Yes |
Visual |
||
|
No |
All |
||
|
No |
All |
||
|
No |
All |
||
|
Yes |
Visual, interactive |
||
|
Yes |
Visual |
||
|
No |
All |
||
|
Yes |
Visual |
||
|
No |
Visual |
||
|
Yes |
Visual |
||
|
Yes |
Refer to parent element’s font size |
Visual |
|
|
Yes |
Visual |
||
|
Yes |
Visual |
||
|
Yes |
Visual |
||
|
Yes |
See individual properties |
Visual |
|
|
No |
See prose |
Visual |
|
|
No |
Refer to width of containing block |
Visual |
|
|
Yes |
Visual |
||
|
Yes |
Refer to font size of element itself |
Visual |
|
|
Yes |
Visual |
||
|
Yes |
Visual |
||
|
Yes |
Visual |
||
|
Yes |
Visual |
||
|
No |
Refer to width of containing block |
Visual |
|
|
No |
Refer to width of containing block |
Visual |
|
|
No |
Refer to width of containing block |
Visual |
|
|
No |
See prose |
Visual |
|
|
No |
Refer to width of containing block |
Visual |
|
|
No |
See prose |
Visual |
|
|
No |
Refer to width of containing block |
Visual |
|
|
Yes |
Visual, paged |
||
|
No |
Visual, interactive |
||
|
No |
Visual, interactive |
||
|
No |
Visual, interactive |
||
|
No |
Visual, interactive |
||
|
No |
Visual |
||
|
No |
Refer to width of containing block |
Visual |
|
|
No |
Refer to width of containing block |
Visual |
|
|
No |
Visual, paged |
||
|
No |
Visual, paged |
||
|
Yes |
Visual, paged |
||
|
No |
Visual |
||
|
Yes |
Visual |
||
|
No |
Refer to width of containing block |
Visual |
|
|
No |
Visual |
||
|
Yes |
Visual |
||
|
No (see prose) |
Visual |
||
|
Yes |
Refer to width of containing block |
Visual |
|
|
Yes |
Visual |
||
|
no |
Refer to height of containing block |
Visual |
|
|
No |
Visual |
||
|
No |
Refer to |
Visual |
|
|
Yes |
Visual |
||
|
Yes |
Visual |
||
|
Yes |
Visual, paged |
||
|
No |
Refer to width of containing block |
Visual |
|
|
Yes |
Visual |
||
|
No |
Visual |
The CSS 2.1 Property Table is Copyright © 2005 World Wide Web Consortium (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
Table B.2. Microsoft proprietary extensions to CSS
|
Name |
Values |
Initial value |
Applies to (Default: all) |
Inherited? |
Percentages (Default: N/A) |
Media groups |
|---|---|---|---|---|---|---|
|
No |
Filter properties | |||||
|
|
|
No |
Visual | |||
|
|
|
Visual | ||||
|
|
Default color |
Element with scroll bar |
Yes |
Visual | ||
|
|
|
Default color |
Element with scroll bar |
Yes |
Visual | |
|
|
|
Default color |
Element with scroll bar |
Yes |
Visual | |
|
|
|
Default color |
Element with scroll bar |
Yes |
Visual | |
|
|
|
Default color |
Element with scroll bar |
Yes |
Visual | |
|
|
|
Default color |
Element with scroll bar |
Yes |
Visual | |
|
|
|
Default color |
Element with scroll bar |
Yes |
Visual | |
|
|
|
No |
Yes |
Visual | ||
|
|
|
No |
Yes |
Visual | ||
|
|
|
No |
Yes |
Visual | ||
|
|
|
Yes |
Visual | |||
|
|
|
Yes |
Visual | |||
|
|
|
No |
Yes |
Visual | ||
|
|
|
No |
Yes |
Visual | ||
|
|
|
Yes |
Visual | |||
|
|
|
Yes |
Visual | |||
|
|
|
Yes |
Visual | |||
|
|
|
No |
Visual | |||
|
|
|
Yes |
Visual | |||
|
|
|
Yes |
Visual | |||
|
|
|
Yes |
visual | |||
|
|
|
Yes |
Visual | |||
|
|
|
Yes |
Visual | |||
|
|
|
No |
Table B.3. Mozilla CSS property extensions
If you enjoyed this excerpt, buy a copy of CSS Cookbook, Third Edition
Copyright © 2009 O'Reilly Media, Inc.