Easy Tutorial
❮ Prop Element Clientwidth Met His Back ❯

tableLayout Property


Definition and Usage

The tableLayout property sets or returns the algorithm used for layouting table cells, rows, and columns.

Syntax

Setting the tableLayout property:

Returning the tableLayout property:

Value Description
auto Default. Column width is set by the content of the cell. This layout can be slow as it requires accessing all content before the table can be fully displayed.
fixed Column width is set by the table width and column width (not by cell content). Fixed layout is faster than auto layout because the user agent can display the table after receiving the first row.
inherit The value of the tableLayout property is inherited from the parent element.

Browser Support

All major browsers support the tableLayout property.

Note: IE7 and earlier versions do not support the "inherit" value. IE8 only supports "inherit" if !DOCTYPE is specified. IE9 supports "inherit".


Example

Setting a fixed table layout:

❮ Prop Element Clientwidth Met His Back ❯