Closed Bug 32205 Opened 25 years ago Closed 24 years ago

Table height percentages wrong for nested tables.

Categories

(Core :: Layout: Tables, defect, P3)

x86
Windows 95
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.6

People

(Reporter: dan6992, Assigned: karnaze)

References

()

Details

(Keywords: testcase, Whiteboard: [awd:tbl] CANDIDATE_094)

Attachments

(5 files)

When a table is nested inside of another table, and it's height is set to a percentage it reacts sporadically depending on the height and content of the parent table (see examples).
Looks like a bug. Changing to NEW.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Actually, according to the HTML spec, there is no HEIGHT attribute to the TABLE tag. NS 4.7 ignores the HEIGHT attribute and renders all three example tables the same. Mozilla should nevertheless decide what it wants to do with the HEIGHT attribute and either expand the table to the full height of the containing cell or ignore the HEIGHT attribute.
Severity: critical → normal
Actually Netscape 4.x does not ignor the height attribute!!! If you set a non-nested tables height to 100% Netscape 4.x renders it correctly (minus the fact it allways thinks there are scrollbars on the screen). This is not just a HTML problem either. If you set the height attribute in a style sheet instead it produces the exact same result. When using the height style this bug also effects fieldsets (and proably other elments I haven't tested yet). I think people expect both the height attribute and the height style to react the same and cause the elemnt to fill all available space of the table cell. IE4 and IE5 both render this page correctly.
Status: NEW → ASSIGNED
Target Milestone: --- → M18
Some testcases: From bug 19526, '"HEIGHT" option in <TABLE>', tables with %-based HEIGHT inside an outer table with %-based HEIGHT appear to work properly: http://bugzilla.mozilla.org/showattachment.cgi?attach_id=3127 From bug 35945, "nested table percent height is not calculated correctly", tables with 100%-HEIGHT inside an outer table with px-based HEIGHT appear to be the same height as specified for the outer table even if the outer table is taller because of its contents. This is arguably correct, but perhaps the inner tavble should be the same height as the outer table actually is. http://bugzilla.mozilla.org/showattachment.cgi?attach_id=7628 Also from bug 35945, if the outer table has no height set, a 100%-height inner table is only as tall as its contents. It would make sense that this table would be the same height as the intrinsic height of the outer table. http://bugzilla.mozilla.org/showattachment.cgi?attach_id=7627 Both of the latter testcases were coded in HTML+CSS.
Is this the same bug as bug 18440?
That test case looks like one of those things optomologists use while trying to get your eyeglass prescription right. "On which side is the text more clear, on the green or on the red?" I'll venture "green".
*** Bug 37439 has been marked as a duplicate of this bug. ***
I think Nav4.7 and 6.0 have got this right. The nested table's containing block (for percentage calculations) is the cell not the outer table. The cell contiaining the nested table does not have a height specified so the nested table is only as high as it needs to be. Marking invalid.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Adding 'verifyme' keyword
Keywords: verifyme
I disagree! A cells height is governed by the hight of the table that contains it, and a tables height is governed by it's content so there is no way to know ahead of time what size either a table or cell will be to set their height values explicitly. What I think needs to be done is that the tables height needs to be a calculate value rather then an explicit value when either of the following occur... 1) The tables height is forced larger then the value set in the height attribute by it's content. 2) The tables height attribute is omitted or invalid. I believe this would fix all the problems I've demonstrated in my example and should not introduce any other rendering issues. Dan
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Sorry for the spam...
*** Bug 50472 has been marked as a duplicate of this bug. ***
*** Bug 50472 has been marked as a duplicate of this bug. ***
From bug 50472: Using CSS, height:100% (or any other percentage) doesn't work on a table that is nested inside another, and the height is not specified directly on the outer TD. This sounds like a wrong interpretation of this quote from the CSS2 spec: "If the height of the containing block is not specified explicitly (i.e., it depends on content height), the value is interpreted like 'auto'." This sentence contradicts itself a little bit. 'not specified explicitly' is not the same as 'depends on content height'. Current practice in other browsers (i.e. IE) is: "If the height of the containing block depends on content height, the value is interpreted like 'auto'." The attachment should make things clearer.
Keywords: testcase
Target Milestone: M18 → ---
Moving to m1.0
Status: REOPENED → ASSIGNED
Target Milestone: --- → mozilla1.0
QA contact update
QA Contact: chrisd → amar
Blocks: 97138
adding nsbranch keyword since %height in the nested tables are commonly used..
Keywords: nsbranch
I didn't nominate this as nsbranch, because bug 97138 which fixes it, is quite large and has some risk associated with it.
Keywords: nsbranchnsbranch-
Whiteboard: CANDIDATE_094
Target Milestone: mozilla1.0 → mozilla0.9.6
Whiteboard: CANDIDATE_094 → [awd:tbl] CANDIDATE_094
Blocks: 107067
Keywords: nsbranch-
fixed by meta bug 97138.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago24 years ago
Resolution: --- → FIXED
No longer blocks: 97138
Depends on: 97138
mass remove verifyme requests greater than 4 months old
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: