W3C home > Mailing lists > Public > www-style@w3.org > May 2004

width:auto; margin-left:auto; margin-right:auto

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sat, 29 May 2004 16:02:17 -0700
Message-ID: <005101c445d1$0bd97aa0$0301a8c0@ATHLON>
To: <www-style@w3.org>

Question about modelling <TABLE> layout by CSS.

If you have <TABLE> without width set then its width computed value will be
set to
'intrinsic-table-max-width' or to 'container-width' whichever is smaller.

<TABLE border=1 align=center>
<TR>
<TD>first cell</TD>
<TD>secons cell</TD>
</TR>
</TABLE>

My best guess that this behaviour could be described as

table { width:auto; margin-left:auto; margin-right:auto; }

But we have this limitation:
"If 'width' is set to 'auto', any other 'auto' values become '0' and 'width'
follows from the resulting equality."
[http://www.w3.org/TR/CSS21/visudet.html#blockwidth]

My another guess: to use max-width:auto  but 'auto' is not allowed in
max-width....

Any ideas of how to describe layouts like this?

Andrew Fedoniouk.
http://terrainformatica.com
Received on Saturday, 29 May 2004 19:03:11 GMT

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