Appendix C. CSS Properties

This appendix is a reference to the main CSS properties that you will be using to control the appearance of your documents.

For each property covered, you will first see a very brief description of the property and then an example of its usage. Then the tables on the left show the possible values the property can take, along with the first versions of IE, Netscape, and Firefox to support these properties.

The table on the right indicates whether the property can be inherited, what the default value for the property is, and which elements it applies to.

At the end of the Appendix Are units of measurement.

While Netscape and Firefox support the inherit value of many properties, if it is unable to set the property to some other value in the first place, then this value is of little use.

The tables indicating which browser version supported a value are based on browsers on the Windows platform. Internet Explorer 5 on a Mac has notably better support for many of the properties than its Windows counterparts.

Font Properties

The font properties allow you to change the appearance of a typeface.

font

Allows you to set several font properties at the same time, separated by spaces. You can specify font-size, line-height, font-family, font-style, font-variant, and font-weight in this one property.

font {color:#ff0000; arial, verdana, sans-serif; 12pt;}

Value

IE

N

FF

[font-family]

3

4

1

[font-size]

3

4

1

[font-style]

3

4

1

[font-variant]

4

6

1

[font-weight]

3

4

1

[line-height]

3

4

1

inherit

-

6

1

Inherited ...

Get Beginning Web Programming with HTML, XHTML, and CSS, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.