table-layout
The table-layout property specifies the algorithm used to lay out the table cells, rows, and columns.
CSS2
Syntax
table-layout: auto | fixed | inherit
Initial: | auto |
Applies To: | table and inline-table elements |
Inherited: | no |
Percentages: | NA |
Media: | visual |
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 |
DOM
[window.]document.getElementById("element-id").style.tableLayout = "table-layout";
Example | auto
Example | fixed
Example | DOM
External
W3C Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification