Sets a string that indicates whether the table layout is fixed.
String that specifies one of the following values:
Default. Column width is set by the widest unbreakable content in the column cells.
Table and column widths are set either by the sum of the widths on the COL objects or, if these are not specified, by the width of the first row of cells. If no width is specified for the table, it renders by default with width=100%.
The property has a default value of auto. It is not inherited.
You can optimize table rendering performance by specifying the table-layout property. This property causes browsers to render the table one row at a time, providing users with information at a faster pace. The table-layout property determines column widths for a table in the following order:
By using information in the width property for the COL or COLGROUP element.
By using information in the width property for the TD elements in the first row.
By dividing the table columns equally, regardless of the size of the content.
If the content of a cell exceeds the fixed width of the column, the content is wrapped, or, if wrapping is not possible, it is clipped. If the table-layout property is set to fixed, the overflow property can be used to handle content that exceeds the width of a TD element. If the row height is specified, wrapped text is clipped when it exceeds the set height.
Setting the property to fixed significantly improves table rendering speed, particularly for longer tables.
Setting row height further improves rendering speed, again enabling the browser's parser to begin rendering the row without examining the content of each cell in the row to determine row height.
This example uses the cascading style sheet property to set the table layout to fixed:
<table style="table-layout:fixed" width=600> <col width=100><col width=300><col width=200> <tr height=20> <td>...</td><td>...</td><td>...</td> </tr> : </table>
This property is defined in Cascading Style Sheets (CSS), Level 2 (CSS2) .