Book HomeCascading Style Sheets: The Definitive GuideSearch this book Friday 19th of January 2018 12:53:00 AM

9.6. Summary

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.

The word-spacing property will accept a length that is either positive or negative. This value is added to the usual space between words, which perhaps isn't quite what you might expect. In effect, word-spacing is used as a modifier to interword spacing. Therefore, the default value of normal is the same as setting a value of zero (0), as shown in Figure 4-46:

the technical details of color generation to already think in terms of 0-255 values.

Then again, such people are probably more familiar with thinking in hexadecimal notation, which is what we turn to next.

3.1.2.3. Hexadecimal colors

If you wanted to make any element immediately following an H2 silver, then the universal selector comes into play:

H2 + * {color: silver;}

The fact that user agents ignore text between elements can actually be used to your advantage in many circumstances. Take, for example, a document design in which you want STRONG text to be gray, except when it follows EM text, in which case it should be silver:BODY {color: black;} /* replacement CSS */ A:link {color: #808080;} A:active {color: silver;} A:visited {color: #333333;}

Figure 6-3

Figure 6-3. Replacing BODY attributes with CSS

While this may seem like a lot of extra typing, consider that using the old method of BODY attributes, you could only make changes at the document level. For example, if you wanted some links to be medium gray and others a relatively dark gray, you couldn't do that with the BODY attributes.