W3C home > Mailing lists > Public > www-style@w3.org > June 2001

table caption margin

From: <bernd.mielke@snafu.de>
Date: Sat, 9 Jun 2001 10:57:33 -0400 (EDT)
Message-Id: <E158kAW-0002UI-00@smart.visp-europe.psi.com>
To: www-style@w3.org
Hi,

how would the following html align="center" attribute translate into css?

<html>
<body>
<table align="center" width="300">
<caption style="border:solid">
some caption text
</caption>
<tr><td>cell</td></tr>
</table>
</body>
</html>

For me the following two variants seem to be both valid ( to me ):
a)

<html>
<body>
<table width="300" style="margin-right:auto; margin-left:auto">
<caption style="border:solid; margin-right:auto; margin-left:auto">
the caption box would be 300px wide
</caption>
<tr><td>cell</td></tr>
</table>
</body>
</html>

b)

<html>
<body>
<table width="300" style="margin-right:auto; margin-left:auto">
<caption style="border:solid">
the caption box would as wide as the containing box -> span the whole body
</caption>
<tr><td>cell</td></tr>
</table>
</body>
</html>

One of them is probably wrong, but why?

Thanks for your help

Bernd
Received on Monday, 11 June 2001 07:12:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:09 GMT