element's top to be any higher than the top of a floated element that occurs earlier. Figure 8-34 is an example of this.

Figure 8-34

Figure 8-34. Keeping floats below their predecessors

6. A floating element's top may not be higher than the top of any line box with content that precedes the floating element.

Similar to rules 4 and 5, this further limits the upward floating of Book HomeCascading Style Sheets: The Definitive GuideSearch this book Friday 20th of April 2018 04:40:00 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.

let's see how border is used. If you wantall H1 elements to have a thick, silver border,it's very simple. This declaration would be displayed as shownin Figure 7-49:

H1 {border: thick silver solid;}

The drawback with border is that you can onlydefine "global" styles, widths, and colors. In otherwords, the values you supply for border will applyto all four sides equally. If you want the borders to be different from the root directory of the web-server.  Suppose your web pageis http://www.taxidermy.org/~mad_dog/homepage.html and it includesa link to cadavers.html which is located in the same subdirectory. The link could specify the relative URL <A HREF="cadavers.html">(thedefault scheme is http://) or the absolute URL <A HREF="http://www.taxidermy.org/~mad_dog/cadavers.html">. Relative URLs are usually preferable.  If you moved your site to www.weirdos.net,you would have to fix all the absolute URLs; but the relative URLs wouldwork fine.  (They're shorter too.) 

If a URL omits the filename, the browser looks for a file named "index.html"