Closed
Bug 293052
Opened 19 years ago
Closed 11 years ago
colspan displays table incorrectly
Categories
(Core :: Layout: Tables, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: ankurp, Unassigned)
References
Details
(Keywords: testcase)
Attachments
(5 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 load the following html in mozilla and compare the span of the first column to the same html loaded in ie or any html utility. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <body> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td colspan="3"> </td> <td colspan="9" rowspan="2"> </td> <td colspan="2"> </td> <td> </td> <td colspan="2"> </td> <td colspan="2"> </td> </tr> <tr> <td colspan="3"> </td> <td colspan="2"> </td> <td> </td> <td colspan="2"> </td> <td colspan="2"> </td> </tr> <tr> <td colspan="2" rowspan="2"> </td> <td colspan="10" rowspan="2"> </td> <td colspan="2" rowspan="2"> </td> <td colspan="3"> </td> <td colspan="2"> </td> </tr> <tr> <td colspan="5"> </td> </tr> </table> </body> </html> Reproducible: Always Steps to Reproduce: load above html into firefox. Actual Results: the colspan was displayed incorrectly and the first cell did not span three columns. Expected Results: span correctly.
Comment 1•19 years ago
|
||
Comment 2•19 years ago
|
||
(In reply to comment #0) Actually, it renders different in Firefox, Opera and IE I don't know which one is right though.
Updated•19 years ago
|
Component: General → Layout: Tables
Keywords: testcase
Product: Firefox → Core
QA Contact: general → layout.tables
Version: unspecified → 1.0 Branch
Reporter | ||
Comment 3•19 years ago
|
||
IE display that table structure correctly. The first cell in the first row should span 3 columns. (In reply to comment #2) > (In reply to comment #0) > Actually, it renders different in Firefox, Opera and IE > I don't know which one is right though.
Comment 4•19 years ago
|
||
The cells in that table doesnt sum up correclty, how about attaching one that is correct?
Reporter | ||
Comment 5•19 years ago
|
||
They do add up properly, please take the rowspans into account, view the file in IE to see what the table should look like. Each row has 19 columns. (In reply to comment #4) > The cells in that table doesnt sum up correclty, how about attaching one that is > correct?
Updated•19 years ago
|
Whiteboard: DUPEME
Is it possible to reduce the testcase further?, it might be a dupe of bug 187550
Comment 7•18 years ago
|
||
Ankur/Reporter appears to be gone. bug 187550 be the dup, or it could be a bug earlier than that.
Comment 8•16 years ago
|
||
Comment 9•16 years ago
|
||
This is one row stripped down from a year schedule to read the Bible. Notice how Hosea and Amos are the wrong size in Firefox compared to Safari/IE.
Comment 10•16 years ago
|
||
This simplified testcase reveals that it isn't a bug, merely an edge case that isn't handled as the reporter expected. The colspans are arranged in such a way that any content that would have appeared in the middle column is allowed to flow into one of the neighboring columns. Hence, the middle column can collapse to 0 width. There are two ways around this. Either add formatting instructions (inline HTML or via stylesheets) to force the empty column to maintain a specific width, or else make sure the table has a row with some content in the middle column only, so that it can't collapse with neighboring columns.
Comment 11•16 years ago
|
||
Another example of the collapsing cells effect. View it side-by-side in another browser (I used Opera) to see the differences. It's also quite informative to comment out various portions of the embedded CSS and observe how it affects the rendering.
Comment 12•15 years ago
|
||
It's a bug here is a simplistic code example that shows it's not working correctly. Run this same html against Firefix 2.+ and it works as you would expect. Output should look like this: ROOT 1 SUBDATA 1 1 SUBDATA 1 1 1 SUBDATA Firefox 3.+ showing this: ROOT 1 SUBDATA 1 1 SUBDATA 1 1 1 SUBDATA HTML EXAMPLE: <HTML> <Body> <H3> COLSPAN - PROBLEM introduced in Firefox 3 </H3> <TABLE> <TR> <TD COLSPAN=20>ROOT</TD> </TR><TR> <TD>1</TD> <TD COLSPAN=20>SUBDATA</TD> </TR><TR> <TD>1</TD> <TD>1</TD> <TD COLSPAN=20>SUBDATA</TD> </TR><TR> <TD>1</TD> <TD>1</TD> <TD>1</TD> <TD COLSPAN=20>SUBDATA</TD> </TABLE> </BODY> </HTML>
Comment 13•15 years ago
|
||
whats the difference between comment 12 and https://bugzilla.mozilla.org/show_bug.cgi?id=75061#c10 ?
Comment 14•15 years ago
|
||
Nothing, As they may be related to the same core problem. I found bug # 75061 later and decided to add it there as well. I didn't want to create a new bug.
Comment 15•15 years ago
|
||
I created a new thread for Comment #10 - Bug 505655
Comment 16•15 years ago
|
||
IGNORE #15 - I created a new thread for sorry #12 (not #10) - Bug 505655.
Comment 17•13 years ago
|
||
I found what I think is the simplest case of this problem by accident today. Using the following code, all with fixed width, the two colspan=3 cells should overlap by 200px. Instead, in Firefox, they abut diagonally. <table cellspacing='3' border='1' style='width: 600px;'> <tr> <td style='width: 100px;'>100px</td> <td colspan='3' style='width: 300px;'>colspan 3</td> <td style='width: 100px;'>100px</td> <td style='width: 100px;'>100px</td> </tr> <tr> <td style='width: 100px;'>100px</td> <td style='width: 100px;'>100px</td> <td colspan='3' style='width: 300px;'>colspan 3</td> <td style='width: 100px;'>100px</td> </tr> </table> If you move the last colspan=3 column to the end, you can see that the 100px cells above and below the colspan=3 columns are being stretched to fill space, rather than the colspan=3 cells correctly overlapping.
Comment 18•12 years ago
|
||
still getting the bug with FF 14
Comment 19•12 years ago
|
||
Still getting the bug with FF 17. If you look at the following page: http://neilb.org/table-bug/index.html This has a simple example illustrating the bug, and images showing how it renders in a number of browsers. Chrome, Safari, and Sleipnir all handle it as I expected. Firefox, Opera, Camino and IE all have broken rendering.
Comment 20•11 years ago
|
||
Seems fixed to me, using FF28.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•