Skip to content

Commit 76388d4

Browse files
committed
[css2] Allowed that a UA uses fixed table layout in some cases even when
width' is 'auto' --HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%402002
1 parent 8bbd80d commit 76388d4

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

css2/tables.src

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: tables.src,v 2.58 2002-12-10 13:47:29 bbos Exp $ -->
3+
<!-- $Id: tables.src,v 2.59 2003-01-10 22:09:17 bbos Exp $ -->
44
<head>
55
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
66
<title>Tables</title>
@@ -760,16 +760,22 @@ table's width, the width of the columns, and borders or cell spacing.
760760
class="propinst-width">'width'</span> property. A value of 'auto' (for
761761
both 'display: table' and 'display: inline-table') means use the <a
762762
href="#auto-table-layout">automatic table layout</a> algorithm.
763+
However, if the table is a block-level table ('display: table') in
764+
normal flow, a UA may (but does not have to) use the algorithm of <a
765+
href="visudet.html#q6">10.3.3</a> to compute a width and apply fixed
766+
table layout even if the specified width is 'auto'.
763767

764-
<p class=note style="color:red">[Possible change to that last
765-
sentence: the width of a table (but not of an 'inline-table') could in
766-
principle be derived from the containing block's width, exactly as for
767-
block elements, allowing the fixed layout algorithm to be used even if
768-
'width' is 'auto'. This would in addition allow 'table {margin: 1em;
769-
table-layout: fixed}' to create a table that is 100% - 2em wide.
770-
Suggestion by <a
771-
href="http://lists.w3.org/Archives/Public/www-style/2002Aug/0286.html">
772-
Fantasai.</a>]
768+
<div class="example">
769+
If a UA supports fixed table layout when 'width' is 'auto', the
770+
following will create a table that is 4em narrower than its containing
771+
block:
772+
773+
<pre>
774+
table { table-layout: fixed;
775+
margin-left: 2em;
776+
margin-right: 2em }
777+
</pre>
778+
</div>
773779

774780
<P>In the fixed table layout algorithm, the width of each column is
775781
determined as follows:</p>

0 commit comments

Comments
 (0)