Closed
Bug 269272
Opened 20 years ago
Closed 20 years ago
Table margin applied to rowgroups and not caption
Categories
(Core :: Layout: Tables, defect)
Core
Layout: Tables
Tracking
()
VERIFIED
INVALID
People
(Reporter: dhtmlkitchen, Assigned: roc)
Details
Attachments
(1 file)
|
1.83 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 Applying a margin-top to a table, the caption will not be offset by the tables's margin; rather, the caption will remain in the same place on the page and the table's row groups will be offset by the table's margin-top Reproducible: Always Steps to Reproduce: 1. See test case. 2. 3. Actual Results: Caption remains in same position, regardless of table margin. Expected Results: Caption will be offset by table's margin. IE gets it right.
| Reporter | ||
Comment 1•20 years ago
|
||
Comment 2•20 years ago
|
||
According to this figure Mozilla's rendering seems correct: http://www.w3.org/TR/2004/CR-CSS21-20040225/tables.html#q5
| Reporter | ||
Comment 3•20 years ago
|
||
It is not correct at all. Spec: "...a table may behave like a block-level or inline-level element. ...In both cases, the table element generates an anonymous box that contains the table box itself and the caption's box (if present)." The anonymous box is not affected by margin-top. Instead, only the rowgroups are affected by margin-top, leaving the caption hanging.
Updated•20 years ago
|
Assignee: general → roc
Component: Browser-General → Layout: View Rendering
QA Contact: general → ian
The image shows clearly to me that the table margin is between the table top and the caption bottom.Which seems reasonable ss they have their own margins. And they should collapse if a margin-top is specified on the table and margin-bottom on the caption. Invalid IMHO. Asking fantasai for a second oppinion.
Confirming INVALID.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 6•20 years ago
|
||
margin-top was set on the table element, not on the rowgroup.
The table contains the caption.
The thead and the caption are both parts of the table.
Margin on the table should move both parts.
Now what should happen if you apply:
.data-table [
position: relative;
top: 1ex;
}
According to your view, the rowgroups would move down, but what actually happens
is that the whole table is shifted down.
Not invalid.
Try again :)Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Positioning moves the anonymous box that contains both the table and the caption. However, the inner table box (which does not include the caption) and the caption box have their own margins, which collapse between the two boxes. http://www.w3.org/TR/CSS21/tables.html#q5 Read the second paragraph. Carefully. And don't reopen the bug, because if you think it's valid then you have not understood the specification properly.
Status: REOPENED → RESOLVED
Closed: 20 years ago → 20 years ago
Component: Layout: View Rendering → Layout: Tables
OS: Windows XP → All
Hardware: PC → All
Resolution: --- → INVALID
If you think that the spec is not clear or you don't agree with it, www-style is a better place to discuss this.
| Reporter | ||
Comment 9•20 years ago
|
||
That's irrelevent, fantasy.
Check this out:
1) open test case (in a new tab or window, so you can see these instructions)
2) In the testcase, goto:
javascript:void(document.getElementsByTagName("table")[0].style.marginTop = "100px")
and see:
[caption]
...
...
...
...
...
...
...
...
...
...
...
...
(rowgroup way down here)
[tbody]
See where the rowgroup is and where the caption is. In FF 1.0, the table
rowgroup is way, way down and the caption is static, unshifted.
The conclusion I come to is that margin-top moves the rowgroup down and does not
move the caption down. Fantasy, is this behavior correct?
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Comment 10•20 years ago
|
||
the margins are applied to the table which is collection of row groups. there is no margin on row groups, invalid
Status: REOPENED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → INVALID
Comment 11•20 years ago
|
||
> The conclusion I come to is that margin-top moves the rowgroup down and does not
> move the caption down. Fantasy, is this behavior correct?
Yes, this behavior is correct. And don't argue about it here.
Verified invalid.Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•