Last floated cell is pushed to the next line

VERIFIED INVALID

Status

()

Core
Layout: Tables
VERIFIED INVALID
15 years ago
14 years ago

People

(Reporter: Wong, Paul, Unassigned)

Tracking

({regression, testcase})

Trunk
x86
Linux
regression, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
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:

Comment 1

15 years ago
Due to   td.zhContent td.dlTitle {float: left;}   in  
http://zh.openoffice.org/css/menuStyle.css

Comment 2

15 years ago
Isnt this what David Hyatt mentions in
http://weblogs.mozillazine.org/hyatt/archives/2003_08.html#003909 ?

Comment 3

15 years ago
Created attachment 130317 [details]
Testcase

Comment 4

15 years ago
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
(Reporter)

Comment 5

15 years ago
I've just changed the CSS on that page.
It's true that it's because of my poor css.
Thanks for reminding
(Reporter)

Comment 6

15 years ago
Invalid
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID

Comment 7

15 years ago
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 → ---
(Reporter)

Comment 8

15 years ago
Oh, sorry about this.

Comment 9

14 years ago
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
Last Resolved: 15 years ago14 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.