mozilla

Revision 25232 of table-layout

  • Revision slug: CSS/table-layout
  • Revision title: table-layout
  • Revision id: 25232
  • Created:
  • Creator: Jürgen Jeka
  • Is current revision? No
  • Comment 157 words added, 68 words removed; page display name changed to 'table-layout'

Revision Content

{{ CSSRef() }}

Summary

table-layout property defines the algorithm to be used to layout the table cells, rows, and columns.

  • {{ Xref_cssinitial() }}: {{ Cssxref("auto") }}
  • Applies to: 'table' and 'inline-table' elements
  • {{ Xref_cssinherited() }}: no
  • Percentages: n/a
  • Media: {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }}: as specified

Syntax

table-layout: inherit | auto | fixed 

Values

{{ Cssxref("inherit") }}
{{ Cssxref("auto") }}
An automatic table layout algorithm is commonly used by most browsers for table layout. The width of the table and it's cells depends (among others) on the content inside.
fixed
Table and column widths are set by the widths of table and col elements or by the width of the first row of cells. Cells in subsequent rows do not affect column widths.
Under the "fixed" layout method, the entire table can be rendered once the first table row has been downloaded and analyzed. This can speed up rendering time over the "automatic" layout method, but subsequent cell content may not fit in the column widths provided. Any cell that has content that overflows uses the {{ Cssxref("overflow") }} property to determine whether to clip the overflow content.

Examples

{{ CSSRefExampleLink("table-layout") }}

.contentbox {
  table-layout: fixed;
}

Specifications

Browser compatibility

Browser Lowest Version
Internet Explorer 5.0
Firefox 1.0
Opera 7.0
Safari 1.0

See also

{{ CSS_Reference:Table_Properties() }}

Revision Source

<p>{{ CSSRef() }}</p>
<h3 name="Summary">Summary</h3>
<p><code>table-layout </code>property defines the algorithm to be used to layout the table cells, rows, and columns.</p>
<ul> <li>{{ Xref_cssinitial() }}: {{ Cssxref("auto") }}</li> <li>Applies to: 'table' and 'inline-table' elements</li> <li>{{ Xref_cssinherited() }}: no</li> <li>Percentages: n/a</li> <li>Media: {{ Xref_cssvisual() }}</li> <li>{{ Xref_csscomputed() }}: as specified</li>
</ul>
<h3 name="Syntax">Syntax</h3>
<pre class="eval">table-layout: inherit | auto | fixed 
</pre>
<h3 name="Values">Values</h3>
<dl><dt>{{ Cssxref("inherit") }} </dt><dt>{{ Cssxref("auto") }} </dt><dd>An automatic table layout algorithm is commonly used by most browsers for table layout. The width of the table and it's cells depends (among others) on the content inside. <br>
</dd><dt>fixed</dt><dd> Table and column widths are set by the widths of<code> table </code>and<code> col </code>elements or by the width of the first row of cells. Cells in subsequent rows do not affect column widths.<br>
Under the "fixed" layout method, the entire table can be rendered once the first table row has been downloaded and analyzed. This can speed up rendering time over the "automatic" layout method, but subsequent cell content may not fit in the column widths provided. Any cell that has content that overflows uses the {{ Cssxref("overflow") }} property to determine whether to clip the overflow content.<br>
</dd></dl>
<h3 name="Examples">Examples</h3>
<p>{{ CSSRefExampleLink("table-layout") }}</p>
<pre class="eval">.contentbox {
  table-layout: fixed;
}
</pre>
<h3 name="Specifications">Specifications</h3>
<ul> <li><a class="external" href="http://www.w3.org/TR/CSS21/tables.html#width-layout">CSS 2.1 #table-layout</a></li>
</ul>
<h3 name="Browser_compatibility">Browser compatibility</h3>
<table class="standard-table"> <tbody> <tr> <th>Browser</th> <th>Lowest Version</th> </tr> <tr> <td>Internet Explorer</td> <td>5.0</td> </tr> <tr> <td>Firefox</td> <td>1.0</td> </tr> <tr> <td>Opera</td> <td>7.0</td> </tr> <tr> <td>Safari</td> <td>1.0</td> </tr> </tbody>
</table>
<h3 name="See_also">See also</h3>
<p>{{ CSS_Reference:Table_Properties() }}</p>
Revert to this revision