CSS table-layout property
Examples
Set the table layout algorithm:
table
{
table-layout:fixed;
}
{
table-layout:fixed;
}
Attribute definitions and instructions
table-layout attribute set for the table table layout algorithm.
Defaults: | auto |
---|---|
inherit: | no |
version: | CSS2 |
JavaScript syntax: | object .style.tableLayout = "fixed" |
Browser Support
All major browsers support table-layout property.
Note: IE7 and earlier versions do not support "inherit" value.IE8 need to define! DOCTYPE. IE9 support "inherit".
Property Value
value | description |
---|---|
automatic | default. Column width is set by the cell contents. |
fixed | Column width is set by the table width and column width. |
inherit | Provisions should inherit values from the table-layout property of the parent element. |
related articles
CSS tutorial: CSS table