Closed
Bug 50695
Opened 24 years ago
Closed 24 years ago
TABLE inside FORM cannot set HEIGHT to 100%
Categories
(Core :: Layout, defect, P2)
Core
Layout
Tracking
()
VERIFIED
FIXED
People
(Reporter: frank, Assigned: karnaze)
References
()
Details
(Keywords: compat, Whiteboard: [rtm-] a=buster(changed from r=), r=pollmann)
Attachments
(2 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
text/html
|
Details |
Note: I picked Form Submission as the component because thats where bug #30988
wound up. This is an offshoot from that bug.
Build ID: 2000082908 on Windows 2000
The above URL is a real world example of what this bug causes (see the bottom
frame). The HTML below is a simplified testcase.
<HTML><BODY>
<FORM>
<TABLE WIDTH="100%" HEIGHT="100%" BORDER=1><TR><TD VALIGN=CENTER ALIGN=CENTER>
This should be in the center of the page.
</TD></TR></TABLE>
</FORM>
</BODY></HTML>
The text appears in the center of the page (both horizontally and vertically) in
Navigator 4.x, IE 5.x and Opera 4.x. The text appears horizontally centered and
flushed to the top of the page in Mozilla.
If you put the FORM inside the TABLE, it works fine. Unfortunately that is not
an option for all the places that this bug bites us in our real world HTML, as
we have multiple tables doing layout inside a single FORM. If you use a number
(ie: 100) instead of a percentage for the HEIGHT attribute, it works fine. The
percentage seems to be what is throwing it off.
Comment 1•24 years ago
|
||
According to the CSS2 spec, we are correct. The TABLE's containing box doesn't
have an explicit height, so we treat percentages as 'auto'. You should probably
be using fixed positioning to achieve the effect you want per the standards.
Assignee: rods → clayton
Component: Form Submission → HTML Element
Keywords: compat
QA Contact: ckritzer → petersen
Reporter | ||
Comment 2•24 years ago
|
||
Thank you for the clarification. I don't disagree with you. However, I am not
using CSS - just old compat HTML. Seeing as the spec does not give a specific
height, and Nav 3.x/4.x, IE, and Opera all vertically center the text, it would
be nice for Mozilla/NS6 to do so as well. Also, seeing as what I really want to
do place the contents of the table in the vertical center of a page that can be
pretty much any size, a fixed position will not work for me.
Comment 5•24 years ago
|
||
Frank, does this happen on any other platforms? Win95, Win98, WinNT, MacOS8.6
or MacOS9? Linux?
Reporter | ||
Comment 6•24 years ago
|
||
I just tried it on a variety of platforms and it happens on all of them. Here
are the platforms and Build IDs that I tested:
RedHat Linux 6.2 : 2000090708
Solaris 2.8 (Sparc): 2000090621
Windows 2000 SP1 : 2000090704
MacOS 8.6 : 2000090704
Reporter | ||
Comment 7•24 years ago
|
||
Is there any chance that this can be escalated to P1 and fixed for NS6 RTM?
This bug bites us in the behind all over the place in our product. We have made
MANY changes to our next release (which has already gone gold) to make it work
correctly and look great with NS6. This is the last remaining bug that we have
an issue with. As you can see from the previous comments, even if we hadn't
already gone gold and still could make changes, there wasn't a good workaround
that we could have implemented. A fixed position doesn't help us, as we are
trying to vertically center content in a page that could be of any height.
Comment 8•24 years ago
|
||
This is a pretty major compat issue. Raising to P2 and confirming.
Before fixing it, we need to understand the backwards-compatibile behavior:
What does height="100%" mean? Does it mean 100% of the height of the
(a) viewport, (b) viewport minus margin of root element (c) viewport minus
margin, border, and padding of HTML and BODY (d) something else? Is it setting
the margin-height or border-height of the table (I assume it's the same as what
pixel-heights do? How does it work inside a table cell (a) with an unspecified
height (b) with a specified height?
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Priority: P3 → P2
Hardware: PC → All
Assignee | ||
Comment 11•24 years ago
|
||
I think we are not compatible in other % height cases, but this bug is a prime
example. The % height basis is the viewport height adjusted to exclude the
margin, border, padding of the html and body. Currently, the table only gets an
artifical height basis (because its parent doesn't have a computed height) if
the table is (1) inside the body or (2) inside the html (which I think can
happen if the body has a display of table). This should probably be changed to
allow the artifical height basis to be computed even if the table's parent is
not the body or html, but that may be a bit risky at this point. As a very safe
hack we could make it work if the table's parent is a form. I'm CCing Buster and
Pollmann because I think they use this code as well for iframe and img, and such
a hack may have a positive compatiblity effect on them.
Status: NEW → ASSIGNED
Assignee | ||
Comment 12•24 years ago
|
||
Comment 13•24 years ago
|
||
r=buster
Comment 14•24 years ago
|
||
I think this is a great compatability improvement, and can't think of any
downside. This change would allow compatability of <IFRAME> percentage height
inside forms as well! r=pollmann
Reporter | ||
Comment 15•24 years ago
|
||
Just built Mozilla with the patch applied, NetTracker 5.0 looks perfect now!
Thank you for taking the time to crush this bug!!
Assignee | ||
Comment 16•24 years ago
|
||
Marking rtm+. When a page hits this bug it is very noticeable. bug 42543 may be
a dup of this and provide yet another url - http://www.ticketonline.de/
Whiteboard: [rtm need info] → [rtm+] a=buster(changed from r=), r=pollmann
Comment 17•24 years ago
|
||
Looked at the URL provided in mozilla, and it doesn't look that bad. Compared to
the other must-fix/crash/data loss bugs we're fixing this week, I think this one
is [rtm-]
Whiteboard: [rtm+] a=buster(changed from r=), r=pollmann → [rtm-] a=buster(changed from r=), r=pollmann
Comment 18•24 years ago
|
||
Comment 19•24 years ago
|
||
discussed with ekrock and clayton and decided rtm-. Please go ahead and fix this
on the trunk.
Whiteboard: [rtm-] a=buster(changed from r=), r=pollmann → [rtm+] a=buster(changed from r=), r=pollmann
Updated•24 years ago
|
Whiteboard: [rtm+] a=buster(changed from r=), r=pollmann → [rtm-] a=buster(changed from r=), r=pollmann
Assignee | ||
Comment 20•24 years ago
|
||
Frank, since you are generating your own html, can you wrap the <form> inside a
table as a workaround. You could do something like:
<table cellspacing=0 cellpadding=0><form></table>
<table height=100% border><tr><td><input type=submit></td></tr></table>
</form>
Reporter | ||
Comment 21•24 years ago
|
||
I just tried the workaround and it solves the problem. I'm surprised that it
is legal and that it doesn't break anything in IE, NS 3.x/4.x, or Opera, but it
works fine. Unfortunately we shipped our product a few days ago, so I can't get
this workaround in until a future version. By then I'm hoping that the problem
will be fixed in Mozilla/NS6.01 instead. :)
Thanks for your help Chris!
Reporter | ||
Comment 22•24 years ago
|
||
Now that NS6 RTM has occurred, is there any chance of this being committed to
the Mozilla/NS6.01?
Assignee | ||
Comment 23•24 years ago
|
||
The patch is in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 24•24 years ago
|
||
Sweet. Just installed 2000112920 on Win2k and it looks great!
Thanks for your help Chris!
Comment 25•24 years ago
|
||
Reassigning QA Contact for all open and unverified bugs previously under Lorca's
care to Gerardo as per phone conversation this morning.
QA Contact: lorca → gerardok
Comment 27•24 years ago
|
||
Verified.
build: 2000-03-07-10-Mtrunk
platform: WinNT
Status: RESOLVED → VERIFIED
SPAM. HTML Element component deprecated, changing component to Layout. See bug
88132 for details.
Component: HTML Element → Layout
You need to log in
before you can comment on or make changes to this bug.
Description
•