Book HomeCascading Style Sheets: The Definitive GuideSearch this book Thursday 05th of May 2016 06:44: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.


makes apparent.

B {padding-left: 10px; padding-right: 10px; background: silver;}
Figure 7-60

Figure 7-60. Padding on an inline element

Note the extra background space that appears on either end of the boldfaced text. There's your padding.

This all seems familiar enough, even when the boldfaced text stretches across multiple lines. Turn to Figure 7-61 to see what happens with padding set on an inline element displayed


Library Navigation Links

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

repeat-left, for example, although it couldcertainly be added in some future version of CSS. For now, you getfull tiling, horizontal tiling, vertical tiling, or no tiling at all.

6.2.4.1. Repeating: Real-world issues

There are a few things to keep in mind when it comes to web browsers.First is that in Navigator 4 and Internet Explorer 4, tiling onlyhappened down and to the right. If you're using Explorer 4,centering an image in the background and then tiling it would look