Zoe M. Gillenwater wrote:
> (Recap: In FF, the caption is rendered less wide than the
> cells below. Opera and IE have it lined up properly.)
> What's happening is that FF is adding the borders for the caption
> *within* the caption's box. This is essentially IE's old
> subtractive box model!
then Maximillian Schwanekamp wrote:
> I looked at this too, and it certainly seems worthy of
> Bugzilla that the caption is 2px off on the left,
> but only 1px off on the right...??
I had a look too, and it seems that the problem is related to the
'collapsing border model'  of tables, selected by "border-collapse:
In that model "the width of the table includes half the table border."
Mozilla makes the caption exactly wide as this table width. And, as Zoe
found, borders on the caption do not add to its width.
It is something more complex to say than to see, so I've created simple test
cases with large borders .
The first two cases use the 'separate borders model' and do not show any
problem in Mozilla. The 3rd and 4th case have the 'collapsing border model'
and show the problem.
If this is a bug, it is certainly not a big one.
Moreover there is big variance, even among modern browsers, in the rendering
of these cases:
Opera 7 does not have the caption problem, but doesn't respect the specs
where they say: "the width of the table includes half the table border."
Safari is correct with the width, and has exactly the same behaviour of
Mozilla with the caption! But it has a problem of narrower caption even
with the 'separate border model.'
(The last two cases are an attempt to make the caption as wide as expected
using margins, either on the table or on the caption. They of course trigger
further variances, as Maximillian noticed.)
All in all Mozilla seems the best player here!
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/