Little Web Hut

CSS 2.1 Reference: table-layout Property

CSS table-layout Property
selector {table-layout: value;}
  • value is specified by using one of the following keywords: auto, fixed, or inherit.

The table-layout property is used to specify the type of algorithm that will be used to layout the table.

This property is specified by using a keyword according to the syntax shown above.

CSS Example: The table-layout properties are set to auto and fixed.
  #tst1 {table-layout: auto;
         display: table;
  #tst2 {table-layout: fixed;
         display: table;
  table {width: 300px;
         margin: 20px;
Test It HTML StyleTest It XHTML StyleTest It HTML5 Style

  • auto - Selects the automatic layout algorithm.
  • fixed - Selects the fixed layout algorithm.
  • inherit - The inherit keyword is used to specify that the value for this property should be taken from the parent element. If inherit is used with the root element, then the initial value for this property will be used.
Applies To Elements that have a display property value of table or inline-table.
Inherited No
Initial Value auto

table-layout Property Examples
Test It HTML StyleTest It HTML StyleTest It HTML5 StyleThe table-layout properties are set to auto and fixed.