Closed
Bug 210175
Opened 21 years ago
Closed 21 years ago
border-collapse hides encompassing element borders
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 155955
People
(Reporter: mozbugzilla2021, Assigned: dbaron)
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030612
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030612
In the uploaded testcase, in which there is a table with CSS property
"border-collapse : collapse" encompassed by a div, the border of the parent
element (div) is overwritten by the border of the inline (table) element.
Reproducible: Always
Steps to Reproduce:
1. View test case.
Actual Results:
Three sides of the border of the <div> are overwritten.
Expected Results:
The <div> and <table> borders should have been rendered separately.
In 1.3.1, only the top and left borders were overwritten. In 1.4RC2, all borders
except the bottom border are affected. This is not a duplicate of bug #196133,
which was resolved.
Assignee | ||
Comment 2•21 years ago
|
||
The spec says that the outside borders of 'border-collapse' tables live half
outside and half inside the table. That probably partly explains this...
Comment 3•21 years ago
|
||
Yep. There should be a 1/2px overlap between those two borders, if I read the
spec correctly. We end up rounding that 1/2px to 1 at the top and left, 0 at
the bottom and right....
Didn't intend to not respond for so long. No, you see, these aren't encompassing
table elements. It is a <div> encompassing a <table>, the <div> does not have
border-collapse set to collapse, and even if it did, it should not be combining
with the table borders.
see http://www.w3.org/TR/CSS21/tables.html#collapsing-borders
[quote]
Note only half of the two exterior borders are counted in the table width; the
other half of these two borders lies in the margin area.
[end quote]
[quote]
Note that in this model, the width of the table includes half the table border.
[end quote]
Here is a testcase with margins set on the table. My guess is that mozilla's
behavior can be considered standard compliant but doesn't look good.
However it seems odd that the borders of the table lie in the margin for top
and right borders but lie in the table for bottom and right borders. css2.1
says:
[quote]
User agents must find a consistent rule for rounding off in the case of an odd
number of discrete units (screen pixels, printer dots).
[end quote]
Is Mozilla's behavior considered consistent? CSS2.1 says that half of the table
border lies in the margin area. What about the case when there isn't a margin
(attachment 1 [details] [diff] [review])? CSS2.1 also does not say anything about top and bottom borders.
Also, as of Moz1.4, the right border is also sometimes overwritten in the first
testcase (resize your browser window).
This is indeed an issue in CSS2.1. See
http://lists.w3.org/Archives/Public/www-style/2003Mar/0003.html
*** This bug has been marked as a duplicate of 155955 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•