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

On Mon, 2 Jul 2001, Tantek Celik wrote:
>
> What *is* supposed to happen when you specify 'height: 100%' on the
> root element (e.g. <html> in an HTML document)?

I think we agree that it is currently undefined.

If we are willing to break backwards-compatability with some potential
compliant implementations, we could change that so that percentages on
the root element are explicitly treated as 'auto'.


> Section 9.1.2 of CSS2 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 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.

In my opinion the parenthetical comment in section 10.1 quoted above
should be stricken. The example further down in that same section also
disagrees it, and all other mentions of 'initial containing block' in
chapters 9 and 10 assume it is the root element.


> Section 9 says the root element is the initial containing block
>   (which leaves unresolved how % height on the root is computed),

Percentage values of 'font-size' on the root element become relative
to the initial value. Extending this to 'height' and 'width' we get '%
of auto' which is defined as 'auto'. I think this is what the spec
should state explicitly.

-- 
Ian Hickson                                            )\     _. - ._.)   fL
Invited Expert, CSS Working Group                     /. `- '  (  `--'
The views expressed in this message are strictly      `- , ) -  > ) \
personal and not those of Netscape or Mozilla. ________ (.' \) (.' -' ______

Received on Monday, 2 July 2001 15:22:40 UTC