The containing block of the "root element" (also called the initial containing block) is established by the user agent. In HTML, the root element is the HTML element, although some browsers may incorrectly use BODY.
For nonroot elements that are not absolutely positioned, the containing block for an element is set as the content edge of the src="../gifs/smbanns.gif" usemap="#banner-map" border=0 alt="Book Home" >
Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
Copyright © 2002 O'Reilly & Associates, Inc. All Rights Reserved.
still used by it, are referred to as external stylesheets. This is due to the fact that they're stylesheets but are external to the HTML document. (Go figure.)In order to successfully load an external style sheet, LINKmust be placed inside the HEAD element but may notbe placed inside any other element, rather likeTITLE or STYLE. This will causethe web browser to locate and load the style sheet and use whateverstyles it contains to render the HTML document, in the manner shown JavaScript to create such effects.
TIP
There are serious issues related to document reflow with:hover and :focus. Take, forexample:
A:hover {font-size: 200%;}In theory, a user agent would have to double the size of anchor textas the pointer hovers over it, which could well cause major redisplay margins are collapsed. If there are negative vertical margins, then the browser should take the absolute maximum of the negative margins and subtract that from the maximum of any positive margins.
In the case where there are only two margins to be collapsed, one positive and the other negative, the situation is handled in a fairly simple manner. The absolute value of the negative margin is subtracted from the positive margin -- or, to put it another way, the negative is added to the positive -- and the resulting value an element by preventing it from being above the top of a linecontaining content that precedes the floated element. Let's saythat, right in the middle of a paragraph, there is a floated image.The highest the top of that image may be placed is the top of theline box from which the image originates. As you can see in Figure 8-35, this keeps images from floating too farupward.
Figure 8-35. Keeping floats level with their context
7. A left (or right) floating element that has anotherfloating element to its left (or right) may not have its right outer