Style tableLayout Property
The Style object
Definition and Usage
The tableLayout property sets or returns the algorithm used to lay out table cells, rows, and columns.
Syntax
Set the tableLayout property:
Object.style.tableLayout="automatic|fixed|inherit"
Return the tableLayout property:
Object.style.tableLayout
| Value | Description |
|---|---|
| auto | Default. Column widths are set by the content of the cells.
|
- The fixed layout is faster than the auto layout because the user agent can display the table after receiving the first row.
Browser support





All major browsers support the tableLayout property.
**Note:** IE7 and earlier versions do not support the "inherit" value. IE8 supports "inherit" only if a !DOCTYPE is specified. IE9 supports "inherit".
Example
Example
Set a fixed table layout:
| table header | table header |
|---|---|
| This is some text. This is some text. | This is some other text |
Try it »
The Style object