Units and values cover a wide spectrum of areas, from length units to color units to the location of files (such as images). For the most part, units are the one area that user agents get almost totally correct; it's those few little bugs and quirks that get you, though. Interpreting relative URLs incorrectly, for example, has bedeviled many authors, and leads to an over-reliance on absolute URLs. Colors are another area where user agents almost always do well, except for a few little quirks here and there. The vagaries of length units, however, far from being bugs, are an interesting problem for any author to tackle.
These units all have their advantages and drawbacks, depending on the circumstance in which they're used. We've already seen some of these, and the nuances of such circumstances will be discussed in the rest of the book, beginning with the CSS properties that describe ways to alter the way text is displayed.
If they still refuse to correct the problem, then you may be able tofix it yourself with a directive file in your web space. If your web
Copyright © 2002 O'Reilly & Associates. All rights reserved.
<IMG SRC="test1.gif" STYLE="margin: 5px;" ALT="first test"> <IMG SRC="test2.gif" STYLE="margin: 5px;" ALT="second test">
(Note that the images in Figure 8-6 are actually inline elements, but they effectively demonstrate that horizontally adjacent margins do not collapse.)
Almost as simple is this: the sum of the horizontal components of a nonfloated block-level element box always equals thesplash.css, the markup would look like this:
<LINK REL="stylesheet" TYPE="text/css" HREF="basic.css"><LINK REL="stylesheet" TYPE="text/css" HREF="splash.css">
This will cause the browser to load both style sheets, combine therules from each, and apply the result to the document (see Figure 1-3). We'll see exactly how the sheets arecombined in the next chapter, but for now, let's just acceptthat they're combined. For example:
<LINK REL="stylesheet" TYPE="text/css" HREF="sheet-a.css">nearest block-level ancestor. This is true even in relative positioning, although it might not seem so at first.
For nonroot elements that are absolutely positioned using a position of absolute, the containing block is set to the nearest ancestor (of any kind) that has a position other than static. This happens as follows: