Summary: | Padding on table cells off by one | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Marcus Better <marcus> | ||||||
Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED INVALID | ||||||||
Severity: | Normal | CC: | rendezvouscp, webkit | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Attachments: |
|
Description
Marcus Better
2007-11-07 05:42:30 PST
Created attachment 17108 [details]
Test case
Created attachment 17109 [details] Result with WebKit r27433 The right- and leftmost boxes are one pixel smaller than the middle one. Marcus, you assume that td have initially padding set to 0, but it isn't true in this case. After initializing "td {padding: 0}" the test case works as expected. You should notice, that every browser have implemented its own default style sheet. http://www.w3.org/TR/CSS21/sample.html have example of such style sheet. However above mentioned example is *informative*, not *normative* so implementators are not obligated to use it. It looks that Webkit uses small default padding set to 1px for td. In this case, for me, the bug is INVALID, but I would like to see final decision made by more experienced Webkit developer. PS. The test case fails completely in Firefox and Opera. (In reply to comment #4) > Marcus, you assume that td have initially padding set to 0, but it isn't > true in this case. Seems you are right. Besides the test case is in content-box mode so I don't see why the boxes should be the same height at all. (In reply to comment #5) > Seems you are right. Besides the test case is in content-box mode so I don't > see why the boxes should be the same height at all. I assume that td is initialized with padding: 0 and borders are set to 0. So computed "visible" height of td is: table 1: 5px + 95px+0px = 100px table 2: 0px + 100px + 0px = 100px table 3: 0px + 95px + 5px = 100px |