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)
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.
Reporter | ||
Comment 1•25 years ago
|
||
Reporter | ||
Comment 2•25 years ago
|
||
Reporter | ||
Updated•25 years ago
|
Whiteboard: testcases
Assignee | ||
Comment 3•25 years ago
|
||
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
Reporter | ||
Comment 5•25 years ago
|
||
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.
Description
•