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




Layout: Block and Inline
15 years ago
15 years ago


(Reporter: Michael O., Unassigned)


Windows 98

Firefox Tracking Flags

(Not tracked)



(1 attachment)



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.

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')."

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.
Last Resolved: 15 years ago
Resolution: --- → INVALID

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.