For those of you concerned about making your documents accessible to older browsers, there is an important warning to be made. You're probably aware that browsers ignore tags they don't recognize; for example, if a web page contains a BLOOPER tag, browsers will completely ignore the tag because it isn't a tag they recognize.

The same will be true with style sheets. If a browser does not recognize <STYLE> and Book HomeCascading Style Sheets: The Definitive GuideSearch this book Wednesday 28th of June 2017 07:19:47 AM

Copyright © 2000 O'Reilly & Associates, Inc. All rights reserved.

Printed in the United States of America.

Published by O'Reilly & Associates, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.

Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly & Associates, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O'Reilly & Associates, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. The association between the image of a koala and the topic of HTML and XHTML is a trademark of O'Reilly & Associates, Inc.

While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

Library Navigation Links

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

keywords. They have the effects you'd expect from their names;for example, top right wouldcause the background image to be placed in the top right corner ofthe element. Let's go back to the small yin-yang symbol:

BODY {background-image: url(yinyang.gif);background-repeat: no-repeat;background-position: top right;}

Incidentally, the result, shown in Figure 6-37,would have been exactly the same had the position been declared as

Users could then pick the style they wanted to use, and the browser would switch from the first one (labeled "Default" in this case) to whichever the reader picked. Figure 1-4 shows one way in which this selection mechanism might be accomplished.

Figure 1-4

Figure 1-4. A browser offering alternate style sheet selection


Alternate styles sheets are only supported by one browser as of this writing -- Internet Explorer for Macintosh -- and that onlythe :first-letter pseudo-element. The style wouldlook something like this:

P.intro:first-letter {font-size: 300%; font-weight: bold; float: left;width: 1em;}

This will result in approximately what is seen in Figure 11-22.

However, as you probably know, older browsers don't support the:first-letter pseudo-element. In many ofthese -- Internet Explorer 3.x and Navigator 4.x, forif a variant labeled "Medium" is the only variantavailable, it is not assigned to500.

A user agent has to do even more work if there are less than nineweights in a given font family. In this case, it has to fill in thegaps in a predetermined way: