css 2.1 changed caption margins




14 years ago
10 years ago


(Reporter: bernd_mozilla, Assigned: bernd_mozilla)



Windows XP
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)




(1 attachment)



14 years ago
the latest version of CSS2.1 that got published today changes the margins on
captions, lovely isn't it?

=> the code should be changed. While it is changed, it would be cool to clean up
the code that I wrote for bug 3166.

This will happen somewhere in august/sept.
Note that the behaviour you do now will be kept for CSS3, as noted in the draft.
So don't delete your code. :-)

Comment 2

14 years ago
*** Bug 300624 has been marked as a duplicate of this bug. ***
*** Bug 309714 has been marked as a duplicate of this bug. ***

Comment 4

13 years ago
Is that also responsible for caption not being centered together with its table like here:
<table style="margin:auto;">

Comment 5

13 years ago
*** Bug 330189 has been marked as a duplicate of this bug. ***
Duplicate of this bug: 371119

Comment 7

12 years ago
Firefox is not conform to CSS 2.1.

My testcase contains two floating tables with captions and margins. The first table has a real caption. The second table has a simulated caption by a <th rowspan="2">. On CSS 2.1 conform browsers both captions should look identical.

Internet Explorer 6 and Opera 9 display the caption conform to CSS 2.1. Firefox is not conform to CSS 2.1 and display the caption conform to the old CSS 2.0.

Comment 8

11 years ago
> caption not being centered together with its table
> like here:
> <table style="margin:auto;">
>   <caption>Caption</caption>

Clarification needed.

As far as I understand this, Firefox 2.x is compliant with CSS 2.0. Where does CSS 2.1 say or suggest or claim that captions do not have or can not have horizontal margins, distinct and separate from the table element?

I do read 
"Captions have their own margins." bug 244848, comment #3
"This makes centering the table easy: just set both table margins and the outer caption margin to auto. (...) It is not possible to center the table and its caption together as a unit in this model."
Mozilla's Caption Model

Many bugs have been resolved as invalid because of the fact that caption have horizontal margins, distinct (working separately) from the table. I can not see where this has changed in CSS 2.1.
Current CSS 2.1 (July 17th 2007) does not prohibit what Mozilla do.

Comment 9

11 years ago
"captions have their own margin" bug 295089, comment #5

CSS 2.1, section 8.3 Margin properties (margin-right, margin-left) says:
Applies to:  	all elements except elements with table display types other than table-caption, table and inline-table
Inherited:  	no

So caption have distinct, separate margin-left and margin-right and they are not inherited from the table element. In other words, in my understanding, what Firefox 2 does is still compliant with CSS 2.1.
What says that the caption's margins go inside the table's is that:

# The width of the anonymous box is the border-edge width of the table box
# inside it, as described by section 17.5.2.

At least partly fixed by bug 363248; still needs a lot more testing of margins.


11 years ago
Keywords: testcase


10 years ago
Duplicate of this bug: 468016


10 years ago
Depends on: 478614
Summary: css 2.1 did change caption margins → css 2.1 changed caption margins

Comment 12

10 years ago
Fixed by bug 478614.

The remaining issues are filed as bug 87277 and bug 372303.
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.