Book HomeCascading Style Sheets: The Definitive GuideSearch this book Tuesday 02nd of September 2014 08:39:39 AM

10.3. Fonts and Text

The font property has also picked up a few new values in CSS2:


These values give the font property the ability to match the font family, size, weight, and so forth, according to the settings users have specified on their computers. For example, icons on a Macintosh are typically labeled using 9-point Geneva. Assuming that hasn't been changed by the user, any font declaration with a value of icon will result in 9-point Geneva for that

H1 {color: gray;}   /* This CSS comment is several lines */H2 {color: silver;} /* long, but since it is alongside */P {color: white;}   /* actual styles, each line needs to */PRE {color: gray;} /* be wrapped in comment markers. */

Given this example, if each line isn't marked off, then most ofthe style sheet will become part of the comment, and so will notwork:

H1 {color: gray;}   /* This CSS comment is several lines
text -- as long as the page is viewed using a Macintosh:

SPAN.OScap {font: icon;}  /* will look like icon labels in OS */

On a Windows system, of course, the font would come out different, and under other window managers (like X), it would look different still. The flexibility is certainly interesting, and it allows the author to easily create pages that have an appearance familiar to the user.

Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.

repeated along the y-axis (that is, vertically) from its startingposition -- in this case, the top left corner of the browserwindow.

Figure 6-29

Figure 6-29. Tiling along the vertical axis

In effect, there is a repeated column in the background, and there isonly one such column. Should you want two columns of symbols in thisexample, then the base image would have to be altered to containside-by-side symbols, as in Figure 6-30.