Open Bug 680761 Opened 13 years ago Updated 2 years ago

margin-top on table-caption with caption-side: left or right is not rendered

Categories

(Core :: Layout: Tables, defect)

defect

Tracking

()

People

(Reporter: crazy-daniel, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: testcase)

Attachments

(1 file)

Attached file testcase (deleted) —
I know, this is table related, not specified in a spec and may actually never get specified at all. I'd just like to have a record or reference. A caption that is positioned to the left or to the right of a table can't have a margin-top (i.e. margin-top is not rendered on such elements). margin-bottom works. According to the description of side caption, margin-top was intended to be rendered, see http://fantasai.inkedblade.net/style/discuss/captions/ Bug 659828 will remove the margin-collapsing of such a margin-top because the table/caption model will be updated to CSS 2.1. That should make it easier to fix this issue.
This might be fixed by including the caption top and bottom margin in nsTableOuterFrame 761 case NS_STYLE_CAPTION_SIDE_RIGHT: 762 case NS_STYLE_CAPTION_SIDE_LEFT: 763 aOrigin.y = aInnerMargin.top; 764 switch (GetCaptionVerticalAlign()) { 765 case NS_STYLE_VERTICAL_ALIGN_MIDDLE: 766 aOrigin.y = NS_MAX(0, aInnerMargin.top + ((aInnerSize.height - aCaptionSize.height) / 2)); 767 break; 768 case NS_STYLE_VERTICAL_ALIGN_BOTTOM: 769 aOrigin.y = NS_MAX(0, aInnerMargin.top + aInnerSize.height - aCaptionSize.height); 770 break; 771 default: 772 break; 773 }
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: