Summary: | table-layout:fixed computes wrong cell width ignoring border width | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alan Tam <Tam> | ||||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED DUPLICATE | ||||||||
Severity: | Normal | CC: | andy_murdoch, bryan, danjwilson, marcoos+bwo, phnixwxz, robert, robin, ryan, tatham, wangxianzhu | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | OS X 10.5 | ||||||||
Bug Depends on: | 78412 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Alan Tam
2008-04-17 21:33:04 PDT
Created attachment 20658 [details]
reduction
reduction
I can confirm this in the following browsers: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-US) AppleWebKit/531.5 (KHTML, like Gecko) Chrome/3.0.194 Safari/531.5 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; pl-pl) AppleWebKit/532.0+ (KHTML, like Gecko) Version/4.0.2 Safari/530.19 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; pl-pl) AppleWebKit/530.19.2 (KHTML, like Gecko) Version/4.0.2 Safari/530.19 I am also pretty sure it was also reproducible in earlier WebKit builds, as I remember having to work around this on one of the sites I made. Note that what comment 0 says about the width needing to be 0 is not actually needed -- any width other than the default value of auto triggers this problem. You can change "width:0" to "width: 600px" in attachment 20658 [details] and still see the issue. Created attachment 33114 [details]
How the testcase is rendered in WebKit, Gecko and Opera
From top: Firefox 3.5, Opera 10alpha, today's WebKit nightly.
Also, IE 7 and 8 render it exactly the same as Gecko and Opera. I'm having a similar issue but with the padding. table { table-layout:fixed; } td { width:70px; padding:0 4px; } Expected Results: cell with a 70px content box and a 78px padding box. Browsers with expected results: IE 6, 7, 8. FF 2, 3. Opera 10. Webkit browser (chrome, safari) Results: cell with a 62px content box and a 70px padding box. Page with issue (this page should be live for awhile): http://www.maxpreps.com/testing/reference_for_webkit_team_regarding_table_bug.htm This seems to be a border-box vs. content-box issue and WebKit is putting fixed layout cells into border-box mode. I have created a fiddle at http://jsfiddle.net/bryanforbes/uuwy5/ which demonstrates that even trying to force TD's into content-box mode with "-webkit-box-sizing: content-box;" fails. This has been fixed by fixing bug 78412. *** This bug has been marked as a duplicate of bug 78412 *** |