% height on <html> (was Re: Table height/width properties)

From: "L. David Baron" <dbaron@fas.harvard.edu>
Subject: Re: Table height/width properties
Date: Mon, Jul 2, 2001, 10:19 AM

> If you specify 'height: 100%' on everything up through BODY and HTML
> then it will be explicitly specified (at least under some
> interpretations of the spec).


Now this is a bit more interesting of a discussion.


What *is* supposed to happen when you specify 'height: 100%' on the root
element (e.g. <html> in an HTML document)?


Per CSS2 (as already quoted in this thread),

  "The percentage is calculated with respect to the height of the generated
box's containing block. If the height of the containing block is not
specified explicitly (i.e., it depends on content height), the value is
interpreted like 'auto'."


And here we have a problem.

Section 9.1.2 of CSS2

 http://www.w3.org/TR/REC-CSS2/visuren.html#containing-block

says: "The root of the document tree generates a box that serves as the
initial containing block for subsequent layout."

Whereas section 10.1 of CSS2

 http://www.w3.org/TR/REC-CSS2/visudet.html#containing-block-details

says: "The containing block (called the initial containing block) in which
the root element lives is chosen by the user agent. "


CSS2 disagrees with itself.

Section 9 says the root element is the initial containing block
  (which leaves unresolved how % height on the root is computed),
whereas Section 10 says the UA chooses the initial containing block
  (which leaves undefined how % height on the root is computed).


Tantek

Received on Monday, 2 July 2001 13:52:28 UTC