Closed Bug 183241 Opened 23 years ago Closed 22 years ago

[quirks]Percent (%) based height fails on tags surrounded with <FORM> tags

Categories

(Core :: Layout: Block and Inline, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: j.macgowan, Unassigned)

References

()

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021120 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021120 When using DIVs or any tags using a "display: block;" style, within <FORM> tags. Percentage based heights will be ignored and the default height of 0px will be used. Reproducible: Always Steps to Reproduce: 1. Create a black page. 2. Create a <DIV style="height: 100%; border: 1px solid black;"> with text in it. 3. Surround DIV with <FORM> tags. Actual Results: DIV appears collapsed, only displaying the border and contained text below DIV. Expected Results: DIV borders should extend the full height of the browser window (minus the default margin and padding).
Does this only happen inside a table?
No, you don't need it to be inside of a table. The following code is all you need to reproduce the bug. <html> <body> <form> <div style="height: 100%; background-color: #E6E6E6; border: 1px solid black;"> This is a test </div> </form> </body> </html>
The example in comment 2 shouldn't even work without the FORM. See http://www.w3.org/TR/CSS21/visudet.html#propdef-height : If the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not positioned, the value is interpreted like 'auto'.
Looks like a quirks-only problem.... We're making the height "0" instead of "auto".
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
Summary: Percent (%) based height fails on tags surrounded with <FORM> tags → [quirks]Percent (%) based height fails on tags surrounded with <FORM> tags
I found a workaround for this bug, incase anyone else runs into it. Add a "height: 10%" style to the <form> tag.
*** Bug 187510 has been marked as a duplicate of this bug. ***
both the quirks mode and standards mode testcases look identical in the 2003-03-26-04trunk build on winXP. the height assumes to take the 'auto' value, not '0'. could this have accidently got fixed?
Possible, yes...
OK, this is worksforme. I have no idea what fixed it, but something did. ;)
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: