|
1 | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
2 | 2 | <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 $ --> |
4 | 4 | <head> |
5 | 5 | <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"> |
6 | 6 | <title>Tables</title> |
@@ -760,16 +760,22 @@ table's width, the width of the columns, and borders or cell spacing. |
760 | 760 | class="propinst-width">'width'</span> property. A value of 'auto' (for |
761 | 761 | both 'display: table' and 'display: inline-table') means use the <a |
762 | 762 | 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'. |
763 | 767 |
|
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> |
773 | 779 |
|
774 | 780 | <P>In the fixed table layout algorithm, the width of each column is |
775 | 781 | determined as follows:</p> |
|
0 commit comments