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
: WebKit
Tables
: 523.x (Safari 3)
: Macintosh Mac OS X 10.4
: P2 Normal
Assigned To:
:
:
: 78412
:
  Show dependency treegraph
 
Reported: 2007-04-12 05:45 PST by
Modified: 2012-03-30 11:00 PST (History)


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


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2007-04-12 05:45:45 PST
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 From 2007-04-12 05:49:34 PST -------
Created an attachment (id=14017) [details]
A tescase for this bug

A testcase, showing both the erroneous and correct way to display the described table...
------- Comment #2 From 2008-07-07 03:27:43 PST -------
Created an attachment (id=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 From 2010-02-03 13:54:42 PST -------
Suspected duplicate of bug 18565.
------- Comment #4 From 2010-10-21 18:39:48 PST -------
(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 From 2010-10-21 18:44:53 PST -------
(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 From 2011-12-12 05:05:30 PST -------
Still reproducible in 535.8 (Chrome 17.0.963.2).
------- Comment #7 From 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 From 2012-03-30 03:02:37 PST -------
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 From 2012-03-30 11:00:36 PST -------

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