Closed Bug 217006 Opened 22 years ago Closed 21 years ago

Last floated cell is pushed to the next line

Categories

(Core :: Layout: Tables, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: pplwong, Unassigned)

References

()

Details

(Keywords: regression, testcase)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030822 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030822 Please look at the table at http://zh.openoffice.org/downloads.html#zh-win (the top table at id="zh-win"). um.. well, though you may not know Chinese, you should still be able to notise that the 3 subtitles are messed together (the words in blue). They should be in 3 diff columns. The table looks OK in Mozilla 1.4 and IE6. Reproducible: Always Steps to Reproduce:
Due to td.zhContent td.dlTitle {float: left;} in http://zh.openoffice.org/css/menuStyle.css
Attached file Testcase
Confirming bug, 2003-08-19-05 trunk Linux. Bug does not occur in Mozilla 1.4 Linux. The computed width is correct for the cells but the last one is still pushed to the next line.
Assignee: other → table
Status: UNCONFIRMED → NEW
Component: Layout → Layout: Tables
Ever confirmed: true
Keywords: regression, testcase
QA Contact: ian → madhur
Summary: Table is not rendered correctly → Last floated cell is pushed to the next line
I've just changed the CSS on that page. It's true that it's because of my poor css. Thanks for reminding
Invalid
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Pui-Lam, this bug report tracks a bug in Mozilla, not wether you have fixed your site or not. Reopening.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Oh, sorry about this.
This bug has OS:Linux. The testcase also shows the problem using Mozilla 2004031616 on Windows 2000.
This is indeed invalid. Table cells have 1px padding on them, so they do not in fact fit in this case. Removing the padding makes them all show on one line.
Status: REOPENED → RESOLVED
Closed: 21 years ago21 years ago
Resolution: --- → INVALID
Hmm, all the tables in the testcase have cellpadding="0". Note also that the TDs are float:left and thus blocks and not table-cells. I suppose there will be an anonymous cell created but shouldn't cellpadding="0" cover that too?
Table cell (or rather td/th) padding comes from the following rules in html.css: 227 td { ... 231 padding: 1px; 232 } 233 234 th { ... 238 padding: 1px; 239 } Since, as you pointed out, floating makes them not be table cells, the cellpadding attribute doesn't affect them. But the style rule is matching on tag, so it still applies to them. So you just have floating blocks with 25% width and 1px paddings.
Hmm... Actually, something else is up. Just floating them shouldn't make cellpadding not apply given how our code is (incorrectly) set up...
Oh, I see. "cellpadding" only affects cells with display:table-cell.
Maybe it would be better to use something like: *|*::-moz-table-cell { padding:1px; ... } Then the %-cases would actually work since they take half of the content width of the anonymous cell.
That would apply the padding to anonymous cells only, then, not to td/th. And we _don't_ want to be applying it to anonymous cells, in fact.
Ok, I see.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: