BODY cannot be set to { min-height: 100% } in standards-compliance mode

RESOLVED INVALID

Status

()

Core
Layout: Block and Inline
RESOLVED INVALID
15 years ago
15 years ago

People

(Reporter: Michael O., Unassigned)

Tracking

Trunk
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5b) Gecko/20030906 Firebird/0.6.1+
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5b) Gecko/20030906 Firebird/0.6.1+

In standards-compliance mode, the BODY element does not obey the CSS rule {
min-height: 100% } even though its parent (the HTML element) is the full height
of the content-area.

Reproducible: Always

Steps to Reproduce:
1. Create a testcase which forces Gecko into standards-compliance mode.
2. Apply the CSS rule { min-height: 100% } to the BODY element.
3. Apply a border to the BODY element so you can see its dimensions.
Actual Results:  
The BODY element is not as tall as the content-area.

Expected Results:  
The BODY element should be at least as tall as the content-area.
(Reporter)

Comment 1

15 years ago
Created attachment 131017 [details]
Simplified testcase

Simplified testcase demonstrating the dimensions of the BODY element in
standards-compliance mode. Opera displays it correctly, and MSIE does not
because it doesn't support the 'min-height' property.

Comment 2

15 years ago
As I read the spec, what the testcase does looks like expected behavior.

"The percentage is calculated with respect to the height of the generated box's
containing block. If the height of the containing block is not specified
explicitly (i.e., it depends on content height), the percentage value computes
to '0' (for 'min-height') or 'none' (for 'max-height')."
http://www.w3.org/TR/CSS21/visudet.html#propdef-min-height

So since there is no explicit height for HTML (as confirmed by the DOM
Inspector), min-height equals 0.  I note also that if I add an explicit 100%
height for HTML to your testcase, then it works as you expect.

I think either Opera sets an explicit height in its UA CSS, or you have found an
Opera bug since the testcase does behave as you expect in Opera 7.

Resolving invalid on this basis.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
(Reporter)

Comment 3

15 years ago
Thanks for the clarification. I had assumed the HTML element has an explicit
height of 100% because it always fills the content-area unless affected by
explicit CSS rules, and it does not depend on content height.
You need to log in before you can comment on or make changes to this bug.