W3C home > Mailing lists > Public > www-style@w3.org > August 2003

CSS3 box height %

From: Bryan C. Mills <bmills@andrew.cmu.edu>
Date: Tue, 12 Aug 2003 12:27:16 -0400 (EDT)
To: www-style@w3.org
Message-ID: <Pine.LNX.4.55L-032.0308121134030.6803@unix47.andrew.cmu.edu>

The current working draft of the box model says (section 8.1):
------------------------------------

A <percentage> is relative to the computed value of the width or height of
the containing block, but if that value is 'auto' the computed value for
the percentage is also 'auto'.

------------------------------------

This is consistent with the CSS2 specification; however, it is not
consistent with the intuition of the document-writing public.

Most people would expect "height: 100%" to cause a box to extend from the
top of the containing block to the bottom of the containing block; this is
also how Internet Explorer 6 renders it in CSS2 (in violation of the
spec).

Rather than defining percentages to be 'auto' for blocks whose parents
have height 'auto', I think percentages should be treated as the
percentage of the 'auto' height of the containing block or 100% of the
intrinsic height of the block, whichever is greater.

It would even warrant consideration to establish that if the intrinsic
height of the block is used, the parent block should be resized so that
the proportions are still correct.  This option, however, deserves extreme
caution -- it may cause severe performance degradation with some
implementations.
Received on Tuesday, 12 August 2003 12:27:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:23 GMT