Closed
Bug 170552
Opened 24 years ago
Closed 24 years ago
Captions not being positioned properly using CSS
Categories
(Core :: Layout: Tables, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: Michael.P.Webb, Assigned: karnaze)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
The caption does not appear to have the table's style applied to it. In the page
at the URL specified, the caption is not indented by 2.5% on each side, like the
table. Also, the table's specified top margin of 16px is not applied to the
caption, it is applied to the first table row (what I'm assuming is being
considered the beginning of the table).
Reproducible: Always
Steps to Reproduce:
1. View the sample data at http://superspudsfun.com/bugs/caption.html
2.
3.
Actual Results:
The caption was not indented and attached to the top of the table.
Expected Results:
I would expect the table's style to cascade to the caption, since the caption
can only be used in a table, per the HTML 4.01 spec.
In this example, that means the caption would be indented to the same width of
the table, and that it would be directly on top of the table border.
http://www.w3.org/TR/REC-CSS2/tables.html#q5 describes the CSS rules, which I
think we're pretty close to following.
Assignee: dbaron → karnaze
Component: Style System → HTMLTables
QA Contact: ian → amar
Comment 2•24 years ago
|
||
Yep. David is right. The caption's box is a _sibling_ of the table's box in
CSS (though in the DOM the caption is a child of the table). Thus if you want
the caption to inherit the table's margins and such you need to explicitly set
the margin values on the caption to "inherit". The picture at that link also
shows that a margin-top on the table should indeed leave space between the first
row and a caption that's at the top of the table.
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•