Closed Bug 10269 Opened 25 years ago Closed 25 years ago

Column width defaults to zero with 'table-layout: fixed'

Categories

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

x86
All
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: dbaron, Assigned: karnaze)

References

()

Details

(Keywords: css2, testcase, Whiteboard: [TESTCASE] Tables with 'table-layout: fixed' and 'width: auto' should be rendered like 'table-layout: auto')

Attachments

(1 file)

Tables with table-layout: fixed: * do not show up * take up lots of space See the above URL. If you see tables, and the page isn't five (?) screens long, it's fixed. Tested on: * Linux, opt, apprunner, 1999-07-20-10-M9
Status: NEW → ASSIGNED
Target Milestone: M10
Whiteboard: [MAKINGTEST] Antti.Nayha@oulu.fi
OS: Linux → All
Summary: tables disappear with table-layout: fixed → Column width defaults to zero with 'table-layout: fixed'
Whiteboard: [MAKINGTEST] Antti.Nayha@oulu.fi → [TESTCASE] Tables with 'table-layout: fixed' and 'width: auto' should be rendered like 'table-layout: auto'
Verifying as a bug, attaching a further minimized test case and rewriting the bug report as follows: Overview Description: If an HTML table has the CSS rule "table-layout: fixed", but both TABLE and TD elements have "width: auto", Mozilla seems to set all cell widths to zero - which means it fails to render the content of such tables. Correct behaviour here would be to calculate cell widths automatically, just like with traditional "table-layout: auto" tables. See http://www.w3.org/TR/REC-CSS2/tables.html#fixed-table-layout Steps to Reproduce: 1) View the attachment "Minimized test case". Actual Results: Nothing but a blank space is rendered. Expected Results: Three table cells with words "One", "Two" and "Three" should be rendered. Build Date & Platform: - Originally reported on Linux, opt, apprunner, 1999-07-20-10-M9 Additional Builds and Platforms: - Occurs on Viewer (8/15/99 build on Win98) Apprunner (8/15/99 build on Win98)
Attached file Minimized test case (deleted) —
I missed that piece in the spec about width: auto. Thanks for catching that. The test page has now been revised and extended. Now the bug only shows up in the first three tables in the test page. Visual debugging shows that the widths are definitely being set to zero. But that doesn't even need to be fixed. You just need to detect auto widths when using the value of table-layout, and use the right strategy.
Please explain to me why this is the case. The spec says: With this (fast) algorithm, the horizontal layout of the table does not depend on the contents of the cells; it only depends on the table's width, the width of the columns, and borders or cell spacing. The table's width may be specified explicitly with the 'width' property. A value of 'auto' (for both 'display: table' and 'display: inline-table') means use the automatic table layout algorithm. My first point of confusion is in the 2nd paragraph. If the table has width auto then it says to use automatic layout. Well, isn't it true that if no width is specified the default is auto. And the intent in that case is to let the cols and/or first row cell widths determine the column widths. My 2nd point of confusion is that I don't see how the spec supports the statements made in the first 8/21 comments.
I think the spec says what it does because setting table-layout: fixed; width: 100%; for all tables would give very strange results, so it doesn't make auto (the default) equal 100% (excluding the usual border and margin issues). I think this is sensible - one must specify at least the overall width of the table if you want to use fixed table layout. It wasn't clear what else you disagreed with.
Summary: Column width defaults to zero with 'table-layout: fixed' → {css2} Column width defaults to zero with 'table-layout: fixed'
Spoke to karnaze during bug triage today. Moving to M11. Not an M10 blocker.
Moving to M13.
*** Bug 23185 has been marked as a duplicate of this bug. ***
Target Milestone: M13 → M14
mass move to m14.
Keywords: css2
Migrating from {css2} to css2 keyword. The {css1}, {css2}, {css3} and {css-moz} radars should now be considered deprecated in favour of keywords. I am *really* sorry about the spam...
Bulk moving [testcase] code to new testcase keyword. Sorry for the spam!
Keywords: testcase
Summary: {css2} Column width defaults to zero with 'table-layout: fixed' → Column width defaults to zero with 'table-layout: fixed'
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Verifying Fixed on build 2000021316 (WinNT4 SP6a).
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: