A <col>'s width should not include a table's cellpadding




15 years ago
15 years ago


(Reporter: bugzilla, Unassigned)


({html4, qawanted, testcase})

html4, qawanted, testcase

Firefox Tracking Flags

(Not tracked)



(1 attachment)



15 years ago
When rendering a table, the col width should not include the table cellpadding

Comment 1

15 years ago
Created attachment 136454 [details]
Self-explanatory testcase

<table cellspacing="0" cellpadding="16" border="2" rules="none" id="idTable">
<col width="100"><col width="200"><col width="300">
<tr><td style="background-color:red;">1st cell</td>
<td style="background-color:green;">2nd cell</td>
<td style="background-color:blue;">3rd cell</td></tr>

should generate a 700px (expected results) wide table rather than a 600px
(actual results) wide table.

Comment 2

15 years ago
from css21

On top of the column groups are the areas representing the column boxes. Each
column is as tall as the column groups and as wide as a normal
(single-column-spanning) cell in the column. The background extends to cover the
full area of all cells that originate in the column, even if they span outside
the column, but this extension does not affect background image positioning.

I think we are doing the right thing.
"cellpadding" is just padding on the cells; the question is what a "column
width" is in CSS....
Keywords: qawanted
QA Contact: ian

Comment 4

15 years ago
fantasai: Could you please shed some light on the issue? (Didn't you write that
? :-))

Comment 5

15 years ago
To make it explicit: I am opposed to exclude the cells border and padding.
First every cell can have a different padding/border. Second the cell does not
inherit the width from the column. It just filles the space provided by the
column. If the content width of the cell would be the column width the columns
would need to leave a larger space between them (borderpadding).

Comment 6

15 years ago
Yes I did. :) You're right, the cell border and padding should be *within* the
column as you say--and since the cellpadding attribute translates to CSS
'padding' on the table's cells, the same applies to that.

See the diagram at http://www.w3.org/TR/CSS2/tables.html#separated-borders

Last Resolved: 15 years ago
OS: Windows XP → All
Hardware: PC → All
Resolution: --- → INVALID
If you think the spec is vague on this, or could do with clarifying, please send 
me an e-mail very soon (like, today).
You need to log in before you can comment on or make changes to this bug.