Sent by Bruno Fassino on 15 January 2005 08:08
Zoe M. Gillenwater wrote:
>> http://66.213.78.40/temp/table.html
> (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' [1] of tables, selected by "border-collapse:
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 [2].
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!
Bruno
[1] <http://www.w3.org/TR/CSS21/tables.html#collapsing-borders>
[2] <http://www.brunildo.org/test/TablCollCapt.html>
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/