Book HomeCascading Style Sheets: The Definitive GuideSearch this book Tuesday 03rd of March 2015 05:29:56 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.

On the other hand, it might be okay to go beyond the bottom and right edges, but not the top or left. Figure 9-13 shows the results of these styles (and remember, the dashed lines are only for illustrative purposes):

DIV#sidebar {position: absolute; top: 0; left: 0; width: 5em; height: 7em;
overflow: hidden; overflow-clip: rect(0, 6em, 9em, 0);}
Figure 9-13

Figure 9-13. Expanding the clipping region

This extends the area in which content can be seen. However, it

Library Navigation Links

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

instead of just a small warning box.

The first is that Navigator 4.x generally adds margin rules to its built-in margins, instead of replacing the built-in values. For example, let's say you want to eliminate the space between H1 elements and paragraphs. Here's the simplest case for doing so:

H1 {margin-bottom: 0;}Web servers typically have 3- or 4-part names; the last two parts comprisethe registered domain name, e.g.,  Some webservers are configured as virtual hosts serving files under multipleserver names and domains.

The path and filename in a URL are typically specified from the rootof the web-server directory, which is some subdirectory of the server'slocal file system.  For security reasons, browsers can't access stuffoutside the web-server directory. 

URLs can specify files by  relative or absolute path. 

#navbar A:link {color: yellow;}

This will change the color of hyperlinks within the navigation bar without affecting other hyperlinks throughout the document.