Book HomeCascading Style Sheets: The Definitive GuideSearch this book Monday 27th of June 2016 06:38:09 PM

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.

style sheet must be brought in via either LINK or@import, you can group all of the styles that willcause Navigator problems and put them into a style sheet that youthen import. Since Navigator will refuse to import this style sheet,it won't have to deal with styles it can't deal with.This simple trick can save you a lot of headaches, but there is onedrawback: a very few early versions of Navigator 4.x could crash whentrying to process an @import statement. This wasquickly fixed, and very few of these versions are still in use.

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.

It's also possible to set the top and bottom margins of ablock-level element to be auto. If either of theseproperties is set to auto, it is reset to0 (zero), effectively removing any top or bottommargin from the element box, as shown in Figure 8-5. The lack of any space between the borders ofeach paragraph is a result of auto beingreinterpreted as zero:

P {margin-top: auto; margin-bottom: auto;}
Looks Something Like This . Instead of upper- and lowercase letters, a small-caps font employs uppercase letters of different sizes. Thus you might see something like the following, shown in Figure 5-29:

H1 {font-variant: small-caps;}
P {font-variant: normal;}

Also, you must have the final version of Explorer 4.x for this to work -- so if you're still using a preview release, you'll need to upgrade it, which is probably a good idea anyway. (Thanks to Howard Marvel for discovering and sharing this trick.)