When rendering a table, the col width should not include the table cellpadding value.
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> </table> should generate a 700px (expected results) wide table rather than a 600px (actual results) wide table.
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....
QA Contact: ian
fantasai: Could you please shed some light on the issue? (Didn't you write that ? :-))
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).
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 Marking INVALID
Status: UNCONFIRMED → RESOLVED
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.