Closed
Bug 346533
Opened 18 years ago
Closed 18 years ago
Table 1px too wide using border-collapse: collapse
Categories
(Core :: Layout: Tables, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 155955
People
(Reporter: pierre, Unassigned)
Details
(Keywords: testcase)
Attachments
(1 file)
(deleted),
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5
When having a div and a table that has a border-collapse: collapse; style inside a container, the table is 1 pixel to wide at the left side. You can compare this with the width of the inner div.
Reproducible: Always
Steps to Reproduce:
1. Create a container div with a div and a table inside.
2. Give the container div a width and the table the same width.
3. Add a border-collapse: collapse; style to the table.
Actual Results:
The table is 1 pixel to wide at the left side, it's even outside the container.
Expected Results:
The table should have the same width as the inner div, it's borders should be exact underneath each other.
HTML testcase:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>CSS test</title>
<style type="text/css">
div#container {
width: 100px;
}
div#top,
div#bottom {
border-left: 1px solid black;
border-right: 1px solid black;
}
table#main {
width: 100px; /* or 100% */
border-collapse: collapse;
}
table#main td {
border: 1px solid black;
}
</style>
</head>
<body>
<div id="container">
<div id="top">top</div>
<table id="main">
<tbody>
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
</tbody>
</table>
<div id="bottom">bottom</div>
</div>
</body>
</html>
When I remove the DOCTYPE it renders fine, also IE and Opera renders okay.
Updated•18 years ago
|
Summary: Table 1px to wide using border-collapse: collapse → Table 1px too wide using border-collapse: collapse
Comment 3•18 years ago
|
||
No doctype means that it renders the page in Quirks mode, with doctype it renders in Standards compliance mode. So there's a good chance that this bug here is invalid. Also see http://developer.mozilla.org/en/docs/Mozilla_Quirks_Mode_Behavior for a overview of all quirks (some newer quirks may not be listed though).
Comment 4•18 years ago
|
||
Actually this bug here might be valid :), if you want read though Bug 155955. It seems the spec was not clear in this cace and changed a few times.
*** This bug has been marked as a duplicate of 155955 ***
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•