Book HomeCascading Style Sheets: The Definitive GuideSearch this book Sunday 25th of February 2018 10:24:44 PM

5.7. Summary

Although authors cannot count on a specific font being used in a document, they can very easily specify generic font families to be used. This particular behavior is generally very well supported, since any user agent that didn't let authors (or even readers) assign fonts would quickly find itself out of favor.

As for the other areas of font manipulation, support varies. Changing the size of fonts usually works well, but twentieth-century

  • For nonroot elements that are absolutely positioned using aposition of absolute, thecontaining block is set to the nearest ancestor (of any kind) thathas a position other thanstatic. This happens as follows:

    1. If the ancestor is block-level, the containing block is set to bethat element's padding edge; in other words, the area that implementations ranged from frustratingly simplistic to very nearly correct in this area. The frustrating part for authors, though, is usually not how font sizing is supported, but how a unit they want to use (points) can yield very different results in different media, or even different operating systems and user agents. The dangers of using points are many, and using length units for web design is generally not a good idea. Percentages, em units, and ex units are usually best for changing font sizes, since these scale very well in all common display environments.

      Now that we've worked our way through altering text and fonts, let's turn to ways to style the elements that contain the text.

      Library Navigation Links

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

      usually first attempt to support. Given that there were some very good positioning implementations on the horizon as the book was being completed, we felt it worthwhile to give readers a glimpse of what's coming soon -- or, if you're reading this book a year or three after its publication, what can be done.

      You may notice that, unlike other chapters, almost none of the figures in this chapter was generated with a web browser. This is something of a statement about the reliability and consistency of positioning implementations at the time of this writing: not one of

      Yes, the figure is correct: the content of the H3 flows past the image, and the background "slides under" the image, so to speak. This is, in its way, no different than the example in which the paragraph that contained the floated image had a visible background.