O'Reilly logo

Beginning Web Programming with HTML, XHTML, and CSS, Second Edition by Jon Duckett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required