Bug 13339 - Padding on TDs not used when determining column widths in table-layout:fixed
: Padding on TDs not used when determining column widths in table-layout:fixed
Status: RESOLVED DUPLICATE of bug 78412
Product: WebKit
Classification: Unclassified
Component: Tables
: 523.x (Safari 3)
: Macintosh Mac OS X 10.4
: P2 Normal
Assigned To: Nobody
:
Depends on: 78412
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-12 05:45 PDT by Nicholas Oxhøj
Modified: 2012-03-30 11:00 PDT (History)
13 users (show)

See Also:


Attachments
A tescase for this bug (1.08 KB, text/html)
2007-04-12 05:49 PDT, Nicholas Oxhøj
no flags Details
second testcase, CSS-table (1.03 KB, text/html)
2008-07-07 03:27 PDT, Ingo Chao
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas Oxhøj 2007-04-12 05:45:45 PDT
If I have horizontal padding on TD's (eg. "td {padding: 0 25px;}"), this padding is apparently ignored when determining column widths in a table with "table-layout: fixed".

If a td has "width: 5px" that column will be 5px wide total (instead of the correct 55px wide - including padding) even though the contents of the column ARE displaced correctly by the 25px padding - and thus overflows into the next columns.
Comment 1 Nicholas Oxhøj 2007-04-12 05:49:34 PDT
Created attachment 14017 [details]
A tescase for this bug

A testcase, showing both the erroneous and correct way to display the described table...
Comment 2 Ingo Chao 2008-07-07 03:27:43 PDT
Created attachment 22124 [details]
second testcase, CSS-table


A second testcase. 

CSS-table with a fixed width of 200px.
table-layout: fixed
left: table cell width:100px, 
right: table cell width:50px and padding-left:50px

webkit does not calculate the width correctly. It distributes the remaining space of the table among the cells, causing a wide left cell (100px+34px) and a smaller right cell (50px+16px).
Comment 3 Tatham Oddie 2010-02-03 13:54:42 PST
Suspected duplicate of bug 18565.
Comment 4 Xianzhu Wang 2010-10-21 18:39:48 PDT
(In reply to comment #3)
> Suspected duplicate of bug 18565.

They might be related, but this bug is about width of padding is not corrected added to the specified width of the table column.
Comment 5 Xianzhu Wang 2010-10-21 18:44:53 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > Suspected duplicate of bug 18565.
> 
> They might be related, but this bug is about width of padding is not corrected added to the specified width of the table column.

Sorry I meant this bug seems not the same as bug 17583. It's in deed very related to bug 18565.
Comment 6 Alexei Osipov 2011-12-12 05:05:30 PST
Still reproducible in 535.8 (Chrome 17.0.963.2).
Comment 7 Marek Stepien 2011-12-12 05:11:49 PST
This is because <td>s stubbornly use border-box mode, see bug 18565 comment 9.

Since bug 18565 has more information about this problem, bug 13339 should be made duplicate thereof.

Unfortunately neither of these bug reports have been marked as confirmed by the WebKit team.
Comment 8 Marek Stepien 2012-03-30 03:02:37 PDT
It seems that fix for bug 78412 fixed this one, too. 

The above testcases work fine for me in Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1085.0 Safari/536.5
Comment 9 Robert Hogan 2012-03-30 11:00:36 PDT

*** This bug has been marked as a duplicate of bug 78412 ***