Book HomeCascading Style Sheets: The Definitive GuideSearch this book Friday 25th of July 2014 10:39:31 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.

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.

8.4.2.2. Adding box properties

As we're awarefrom previous discussions, padding, margins, and borders may all beapplied to inline nonreplaced elements, and they don'tinfluence the line-height at all. If we were toapply some borders to a SPAN element without any

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 across multiple lines:

B {padding: 10px; background: silver;}
Figure 7-61

Figure 7-61. Padding on an inline element that spans multiple lines

As with margins, the left padding is applied to the beginning of the element, and the right padding to the end of it; padding is image dimensions lets the client browser block out the space 
and compose the page quicker. 
<BR CLEAR=LEFT>
You can stop text wrapping by including a CLEAR attribute in aline-break tag. 
Move your mouse over the image and you'll see the text that's specifiedin 
the ALT attribute.For better layout control, specify image dimensions, horizontal andvertical padding space (in pixels, 72 pixels/inch), alignment, etc. Ugly Guy!Specifying