Properties
CSS
table-layout
The table-layout property specifies the algorithm used to lay out the table cells, rows, and columns.
CSS2
table-layout: auto | fixed | inherit
| Initial: | auto |
| Applies To: | table and inline-table elements |
| Inherited: | no |
| Percentages: | NA |
| Media: | visual |
Note: Doctype is required for Internet Explorer 8+
Values
table-layout: value;
| Value: | Description: |
| auto | Determines the width of a column of cells based on the largest unbreakable element in a cell in the column |
| fixed | Determines the width of a column of cells based on the width set on the table, its columns, and first row of cells |
| inherit | Takes the same computed value as the property for the element's parent |
DOM
[window.]document.getElementById("element-id").style.tableLayout = "table-layout";
