Closed
Bug 322236
Opened 19 years ago
Closed 16 years ago
border not properly applied to table nested within div when border-collapse: collapse is applied
Categories
(Core :: Layout: Tables, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 155955
People
(Reporter: jim, Unassigned)
References
()
Details
(Keywords: testcase)
Attachments
(1 file)
(deleted),
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
try the following code in Firefox:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<style>
td { border: 1px solid red; }
</style>
<body>
<div style="width:100%; border: 1px solid blue;">
<table style="width:100%; border-collapse: collapse; border: 1px solid pink;">
<tr>
<td style="text-align:center;">HI</td>
</tr>
</table>
</div>
</body>
</html>
notice that the blue DIV border only appears on the right and bottom sides of the table, rather than all the way around. If you change border-collapse: collapse to border-collapse: separate, the borders/padding work as expected (though it introduces space between the borders that I'm trying to avoid by collapsing my borders). Also, if you remove the DOCTYPE specification and run in quirks mode, the borders appear as expected. Adding padding-left: 1px; and padding-top: 1px to the table also makes the table render properly, but only in Firefox.
Reproducible: Always
Steps to Reproduce:
1. specify a DOCTYPE of HTML 4.01 Transitional
2. nest a table, with individual cell borders and border-collapse:collapse, inside a DIV that also has a border.
Actual Results:
DIV border appears only on the right and bottom of the nested table
Expected Results:
DIV border should go all the way around the nested table.
Updated•19 years ago
|
Component: General → Layout: Tables
Product: Firefox → Core
QA Contact: general → layout.tables
Version: unspecified → 1.8 Branch
Updated•19 years ago
|
Reporter | ||
Comment 1•18 years ago
|
||
I'm still grappling with this bug. Can someone please at least confirm that I am in fact seeing a bug, not just incorrect about the w3c spec?
Comment 2•18 years ago
|
||
Comment 3•18 years ago
|
||
It's probably a duplicate, that's why I didn't confirm it, but it's definitely a bug in Mozilla.
Using border-spacing:0; instead of border-collapse should make it work the way you want.
Comment 4•17 years ago
|
||
I think this is a duplicate of Bug 155955. It covers the same cases as 287011, 291104 & 291147. Which are all marked as duplicates of that bug.
Updated•16 years ago
|
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•