Closed Bug 26376 Opened 25 years ago Closed 25 years ago

Elements styled with height:x% do not resize at all

Categories

(Core :: CSS Parsing and Computation, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: keith.lesch, Assigned: pierre)

Details

(Whiteboard: testcases)

Attachments

(2 files)

The following attachment will show 5 elements, the DIV, INPUT, TEXTAREA, SELECT 
MULTIPLE, and BUTTON.  Each element should take up 20% of the height of the 
page, but none of them do.
Whiteboard: testcases
This is the usual Initial Containing Block problem. The default height for an 
element is 'auto' and 20% of 'auto' still makes 'auto'. If you want the elements 
to have a height of 20% of the viewport, you have to specify it:
    <style>
      html {height:100%;}
      body {height:100%;}
      form {height:100%;}
    </style>

Note that the requirement of "height: 100%" on the html element is a gray area in 
the spec. We may adopt a more lax interpretation like IE's where the default size 
of html element matches the viewport. For the rest, Moz is correct. IE embraces, 
extends... and you know where that leads.

The second testcase, even with the additional style above, reveals another 
instance of bug 915. I copied it over there.

Closed as Invalid (but thanks for the excellent bug report).
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Verified invalid
Status: RESOLVED → VERIFIED
Sorry, I always forget to come in here and verify.  Thank you for the 
explanation of my bad assumptions of what should happen...I totally agree that 
Mozilla should stick to this pattern with heights, as I already know strange 
(and ugly) things happen in IE when you're using percentage heights and 
something is forced out of the viewport.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: