Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

CSS table-layout property


May 06, 2021 CSS Reference Manual


Table of contents


CSS table-layout property


Set the layout algorithm for the table:

table
{
table-layout:fixed;
}

Try it out . . .

Description of property definition and use

Table-layout properties set table layout algorithms for tables.

Default: auto
Inherited: no
Version: CSS2
JavaScript syntax: object .style.tableLayout="fixed"


Browser support

CSS table-layout property CSS table-layout property CSS table-layout property CSS table-layout property CSS table-layout property

Table-layout properties are supported by all major browsers.

Note: I E7 and earlier versions do not support the value of "inherit". I E8 needs to be defined! D OCTYPE。 IE9 supports "inherit".


The property value

Value Describe
auto Default. The width of the column is set by the contents of the cell.
fixed Column width is set by the table width and column width.
inherit Specifies that the value of the table-layout property should be inherited from the parent element.


Related articles

CSS tutorial: CSS table