Closed Bug 386704 Opened 17 years ago Closed 16 years ago

Table caption stretches to full window width when margin:auto

Categories

(Core :: Layout: Tables, defect, P2)

x86
Linux
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: sanniu, Assigned: dbaron)

References

Details

(Keywords: regression, testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a6) Gecko/20070629 GranParadiso/3.0a6
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a6) Gecko/20070629 GranParadiso/3.0a6

Table caption stretches to full window width when margin:auto set to both: table and caption (see Additional Information). In 2.0.0.4 caption width was same as table width.

Reproducible: Always

Steps to Reproduce:
Load a page
Actual Results:  
Caption width=full window width

Expected Results:  
Caption width=table width, as it was in FF 2.0.0.4

Testcase:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<META http-equiv="Content-Style-Type" content="text/css">
<style>
	table.results {
		background-color: #FFFFF5;
		color: #000;
		margin: auto;
	}
	table.results caption {
		background-color: #006;
		color: #fff;
		font-weight: bold;
		margin: auto;
	}
</style>
</head>
<body>
<table class="results">
<caption>Test my caption:</caption>
<tbody>
<tr><th>head1</th><th>head2</th><th>head3</th><th>head4</th><th>head5</th><th>head62</th></tr>
<tr><td>rest</td><td>best</td><td>10</td><td>13</td><td>9</td><td>32</td></tr>
</tbody>
</table>
</body>
</html>
Status: UNCONFIRMED → NEW
Component: General → Layout: Tables
Depends on: 363248
Ever confirmed: true
Keywords: regression, testcase
Product: Firefox → Core
QA Contact: general → layout.tables
Summary: Table caption stretches to full window width when margin:auto (regression) → Table caption stretches to full window width when margin:auto
Version: unspecified → Trunk
Flags: blocking1.9?
See bug 363248 comment #11

In my opinion, this bug should be resolved as a DUPLICATE of bug 363248
Flags: blocking1.9? → blocking1.9+
There is no need to have margin-auto for the caption. It will still stretch to full window width.
Fixed by checkin of bug 363248.  (Some duplicates of this bug were also duped there, but there were really two separate issues there.)
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
This is somewhat tested by the tests that use mozilla/layout/reftests/bugs/386014-1-ref.html as a reference.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: