Book HomeCascading Style Sheets: The Definitive GuideSearch this book Thursday 29th of January 2015 07:14:48 AM

9.6. Summary

set their browsers (or other user agents) to use different foreground(text) colors. If the default text were set to green, the secondparagraph in the preceding example would be green, notblack -- but the first paragraph would still be gray.

You need not restrict yourself to such simple operations, of course.There are plenty of ways to use color. You might have some paragraphsthat contain text warning the user of a potentialproblem. In order to make this text stand out more than usual, you

When it comes right down to it, positioning is a very compelling technology. It's also likely to be an exercise in frustration if you're trying to get it to behave consistently in a cross-browser environment. The problem isn't so much that it won't work in some browsers: it's that it will only sort of work in a number of them, such as Navigator 4 and Internet Explorer 4 and 5. It can be great fun to play with positioning, and one day we'll be able to use it in place of tables and frames while dramatically improving accessibility and backward compatibility. As of this writing, though, it remains a great way to create design prototypes, but a tricky thing to use on a public web site.

As it happens, this sentiment may be applied to the majority of CSS2, which is given an overview in the next chapter.

Library Navigation Links

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


However, on each page, we want the cell containing the current pageto be highlighted in some fashion. This is really easy. All we haveto do is add a class to each table cell, like this:

<TABLE border cellpadding="4"><TR><TD CLASS="home"><A HREF="home.html">Home Page</A></TD><TD CLASS="read"><A HREF="read.html">My Writing</A></TD>

Figure 1-2

Figure 1-2. A representation of how external style sheets are applied to documents

These style sheets, which are not part of the HTML document but are still used by it, are referred to as external style sheets. This is due to the fact that they're style sheets but are external to the HTML document. (Go figure.)

In order to successfully load an external style sheet, LINK must be placed inside the HEAD element but may not be placed inside any other element, rather like