Hello all,
I'm creating some CSS styles for tables that sometimes will have a caption
and sometime will not. I want 1.5em of white space above and below the
table. If the table has a caption, the upper white space should go above the
caption, and there should be 0.5em of white space between the caption and
the first table row. If the table has no caption, the upper white space
should go between the table and the preceding text.
Because the <caption> tag goes just inside the <table> tag, you'd think that
this would do the trick:
table { margin-top: 1.5em; } /* add spacing with or without caption */
caption { margin-bottom: 0.5em; } /* add spacing below caption */
And indeed, this does work in IE8, and in FF3.5 IF there is no caption. But
if there is a caption, Firefox 3.5 adds the margin-top *between* the caption
and the first table row (!?), leaving no white space between the caption and
the preceding text.
Is this a Firefox display bug? Has anyone encountered this and found a
workaround (other than a special class for tables that include captions; I'm
trying to avoid that)?
Jeff Jansen
Modest Systems
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/