CSS2 » Properties » table-layout

Version: Level 2

Compability: IE5.5

Syntax:
table-layout : auto | fixed
fixed
The fixed value dictates the use of the fixed layout algorithm. In this algorithm, the horizontal layout is only dependent on the table's width, the width of the columns, the width of any borders, and the cell spacing. It does not depend on the content of the table cells.
auto
The auto value dictates the use of the auto layout algorithm. In this algorithm, the layout is dependent upon the contents of the individual cells. This requires that the browser first access all of the table contents to determine the layout for each column before the table can be rendered. As a consequence, this algorithm is considered slower than the fixed algorithm.

The table-layout property allows you to choose the layout algorithm for constructing the table. This property is inherited.

This is one of five Level 2 properties that specifically apply style to tables. The other four are border-collapse, border-spacing, caption-side, and empty-cells.
 
There are two type of layout algorithms, auto and fixed.
 

Examples

Code:
table { table-layout: auto; }
Language(s): CSS2
Code:
<table style="table-layout: auto;">
...
</table>
Language(s): CSS2

See Also: