What is the "height" of the initial containing block?

I have a question related to positioning and size of absolutely positioned
elements -- in particular it is related to the height for the initial
containing block, and positioning within that containing block.

The first question is -- what is the actual boundaries of the containing
block?  As a test, suppose I have a div (inside the body) that is
absolutely positioned with properties height: 100px; width: auto; bottom:
0;  right: 0; and left: 0.  I would expect this to be rendered as follows:

------------------------------------------   ---
|                                        |    |
|                                        |    |
|                                        |    |
|                                        |   Viewport height
|                                        |    |
|                                        |    |
|                                        |    |
------------------------------------------    |
|        POsitioned Content              |    |
------------------------------------------   ---

That is, the div would be at the bottom edge of hte viewport 
and would move as the viewport is resized.

This assumes that the containing block is the entire viewport 
-- which, I believe, is true from 10.1 of the spec, although
I can find nowhere a statement such as "the default height
of the root element is the value xxx", so I'm not sure.

The second question is: what do percentage height values scale against?
For example, I have an absolutely positioned div inside the body, with the
div having a percentage height, what is this percentage calculated
relative to?  Here's what I mean:

------------------------------------------   ---
|                                        |    |
|                                        |    |
|                                        |    |
|           --------------               |   Viewport height
|           |            |               |    |
|           |            |               |    |
|           |  pcentage  |               |    |
|           |   height   |               |    |
|           |            |               |    |
|           |            |               |    |
|           |            |               |    |
|           --------------               |    |
|                                        |    |
|                                        |    |
|                                        |    |
------------------------------------------   ---

If the height is scaled relative the viewport height,then 
the div would scale as the viewport is resized, which is 
somehow satisfying. I don;t know what would happen if the
document was larger than the viewport -- I imagine the
height would need to be the 'effective' height of the
entire scrolled page.

But I can't find any obvious clarification in the spec.
--
Ian Graham ......................... Centre for Academic Technology
i a n   d o t   g r a h a m    a t    u t o r o n t o   d o t   c a
Information Commons                               Tel: 416-978-4548
University of Toronto                             Fax: 416-978-7705
..................... http://www.utoronto.ca/ian/ .................

Received on Friday, 1 October 1999 19:01:56 UTC