In the W3C document about CSS2, I read at
http://www.w3.org/TR/REC-CSS2/visure...hoose-position
the following:
absolute
The box's position (and possibly size) is specified with the
'left', 'right', 'top', and 'bottom' properties. These properties
specify offsets with respect to the box's containing block.
The implementation in firefox/mozilla as well as examples
and tutorials on the web say that position:absolute positions
HTML elements with respect to "the document", which seems
to be the root <html> element.
In contrast, I thought that "containing blocks" are generated
also by other elements than <html>, e.g. by <div> or <p>. As
such I would expect e.g. style="top:0px" refer to the edges
of these elements rather than to the edge of the document.
Is the implementation wrong (doubt it), is my understanding
of "containing block" wrong, or is there a special rule for
"containing block" in HTML which says that only the document
root creates a containing block?
Thanks,
Harald.