Re: Center DIV

Ian Hickson / 2003-07-04 19:27:
> On Fri, 4 Jul 2003, Afternoon wrote:
> 
>>I think it would still be useful to create objects that are exactly
>>fitted to the vertical height of the browser window or output page.
> 
> Since in CSS2.1 the root containing block is the size of the viewport,
> anchored at the origin, you can already do that simply by setting the
> 'height' property to '100%'.

Say I have rule
html, body { height: 100%; margin: 0; padding: 0; }
and I have content that requires more than one viewport height of 
vertical space, is the html (or body) element supposed to grow, or 
is the content supposed to overflow the root (or body) element? I'd 
rather set min-height: 100%; so that the root element would grow as 
required for sure, but that browser from Redmond doesn't support it. 
At least some versions of Opera enforced the height to 100% and 
overflowed the content which really messed up one style that used 
absolute positioning with bottom property.

-- 
Mikko

Received on Monday, 7 July 2003 05:18:48 UTC