Closed Bug 7243 Opened 26 years ago Closed 26 years ago

Fixed table layout doesn't work

Categories

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

x86
Other
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: hyatt, Assigned: karnaze)

Details

Make a simple table with a width of 100%. Give it some cols with percentage widths and set table-layout to fixed. The table doesn't show up at all. This occurs in HTML with tables (and not just in XUL with the tree widget).
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Target Milestone: M7
Fixed with latest checkin. Here are the tests I used. <html><body> <table style="table-layout:fixed;" cellspacing=10 border=1> <col width=100> <col width=200> <tr> <td>foo</td> <td>bar</td> </tr> </table> <BR> <table style="table-layout:fixed;" width=400 cellspacing=0 border=1> <col width=100> <col width=200> <tr> <td>foo</td> <td>bar</td> </tr> </table> <BR> <table style="table-layout:fixed;" width=200 cellspacing=0 border=1> <col width=100> <col width=200> <tr> <td>foo</td> <td>bar</td> </tr> </table> <BR> <table style="table-layout:fixed;" cellspacing=10 border=1> <col width=100> <tr> <td>foo</td> <td width=200>bar</td> </tr> </table> <BR> <table style="table-layout:fixed;" cellspacing=1 border=1> <tr> <td width=100>foo</td> <td width=200>bar</td> </tr> </table> <BR> <table cellspacing=20 style="table-layout:fixed;" width=100% border=1> <tr> <td width=40% colspan=2>foo</td> <td width=60%>bar</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>bar</td> </tr> </table> <BR> <table cellpadding=20 cellspacing=10 style="table-layout:fixed;" width=100% border=1> <col width=40%> <col width=60%> <tr> <td style="border: 10px solid black;">foo</td> <td>bar</td> </tr> </table> <BR> <table cellspacing=10 style="table-layout:fixed;" width=100 border=1> <col width=40%> <col width=60%> <tr> <td width=20>foo</td> <td width=20>foo</td> <td width=20>foo</td> </tr> </table> <br> </body></html>
Whiteboard: 6/3 pending reply from assigned engineer as to example 3 where table width<total column width
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: 6/3 pending reply from assigned engineer as to example 3 where table width<total column width
All the tests work properly except for the following: The third example used for testing created a table with a fixed width of 200 and a total COL width of 300. Here is the sample code: <table style="table-layout:fixed;" width=200 cellspacing=0 border=1> <col width=100> <col width=200> <tr> <td>foo</td> <td>bar</td> </tr> </table> The table width of 200 pixels with the fixed table-layout should hold true. Therefore, since the total COL width is greater than the table width, an overflow is created and should be able to be seen through the use of scrollbars. I am reopening bug regarding this issue.
Status: REOPENED → RESOLVED
Closed: 26 years ago26 years ago
Resolution: --- → FIXED
Actually this works per spec. The spec says: "The width of the table is then the greater of the value of the 'width' property for the table element and the sum of the column widths (plus cell spacing or borders)." Note that it is unclear if 'max-width' should trigger overflow (it probably should).
Status: RESOLVED → VERIFIED
OK, I re-read the spec and I see. Verifying bug fixed.
You need to log in before you can comment on or make changes to this bug.