W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: [CSS21] min-height: 100% in html, body

From: Gérard Talbot <www-style@gtalbot.org>
Date: Thu, 26 Jan 2012 22:43:54 -0500
Message-ID: <b744d57967c8babc92ece91e0d768458.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Philippe Wittenbergh" <ph.wittenbergh@l-c-n.com>
Cc: "Lea Verou" <leaverou@gmail.com>, "W3C www-style mailing list" <www-style@w3.org>

"Lea Verou" <leaverou@gmail.com>
 Cc: "www-style list" <www-style@w3.org>

Le Jeu 26 janvier 2012 22:23, Philippe Wittenbergh a écrit :
> On Jan 27, 2012, at 3:25 AM, Lea Verou wrote:
>> http://dabblet.com/result/gist/1683580
>> Opera is the only one that seems to get it right, every other browser I
>> tested (IE, Chrome, Firefox) seems to ignore the min-height declaration.
>> However, I think it's quite improbable that all popular engines but one
>> are buggy. What's the case?
> Why do you expect the background to be green ?
> I personally expect the body to have a computed value of '0' (zero) for
> 'height'.
> Given:
> http://www.w3.org/TR/CSS21/visudet.html#min-max-heights
> (check the prose under '<percentage>')
> Given that, several of Gerards tests should fail (show red) as seen in
> Gecko & WebKit
> Philippe

A percentage height on the root element is relative to the initial
containing block.
10.5 Content height: the 'height' property

  height: auto;
  min-height: 100%;
is not resolvable; as I am trying to understand your point of view,
Philippe, this is what you're basically saying.

If the resulting height is smaller than 'min-height',
Since 'height: auto' is not resolvable, then such comparison is also not
doable. Okay, Philippe: I see your point.

On the other hand,
html {height: 100%;} is.

So, this leaves me with at least 4 tests with predictable layout.

The following 4 tests are correct, should be correct:

'height: 100%' set on html, 'height: 100%' set on body, 'height: 100%' set
on p (h, h, h):


'height: 100%' set on html, 'height: 100%' set on body, 'min-height: 100%'
set on p (h, h, m):

and already submitted to CSS 2.1 test suite:

'height: 100%' set on html, 'min-height: 100%' set on body, 'height: 100%'
set on p (h, m, h):


'height: 100%' set on html, 'min-height: 100%' set on body, 'min-height:
100%' set on p (h, m, m):


regards, Gérard
CSS 2.1 Test suite RC6, March 23rd 2011

Contributions to CSS 2.1 test suite

Web authors' contributions to CSS 2.1 test suite
Received on Friday, 27 January 2012 03:44:31 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:54 UTC