Re: Specifying height of Initial Containing Block?

Ian Hickson wrote:
> 
> [...]
> 
> The containing block of the :root element is undefined, and is almost
> certainly not the viewport, 

Trying to understand - 

The root element establishes the initial containing block - what
comes before that is debateable.
But certainly, as far as width is concerned, CSS2 (9.1.2) seems to
indicate that it will normally be the viewport.

"The width of the initial containing block may be specified with the
'width' property for the root element. If this property has the value
'auto', the user agent supplies the initial width (e.g., the user agent
uses the current width of the viewport)." 

Are you suggesting that, because it's only a 'for example', one should
not count on this?

Otherwise, I know we're only talking width so far, but wouldn't that
have implications generally?

> so height:100% on the HTML element won't help you. 

Even though it works? - browsers I've tried seem to assume viewport
here.

> I have proposed that positioning should apply to the :root element,

I thought 'position' applied to "all elements, but not to generated
content" - does it also indicate 'not root element' somewhere?

> so that you could do:
> 
>    HTML { position: fixed; top: 0; left: 0; right: 0; bottom: 0; }
> 
{...}

In IE5 it seems to work anyway, but in Mozilla, though the root has the
desired dimensions, it seems to fail to establish the height for
descendents (but then, if it's not supposed to work...)

However, that style is what's needed - simply putting it on the body
instead (acknowleging M. Brealey), gives me what I was looking for.

Thanks Ian.


-- 
Regards,
Val Sharp - Edinburgh

Received on Wednesday, 30 August 2000 20:13:47 UTC