CSS table-layout Property
The table-layout property in CSS is used to display the layout of the table. This property is basically used to sets the algorithm that is used to lay out <table> cells, rows, and columns.
Default Value : Its default value is auto.
- auto: It is used to set the automatic table layout on the browser. This property set the column width by unbreakable content in the cells.
- fixed: It is used to set a fixed table layout. The table and column widths are set by the widths of table and col or by the width of the first row of cells. Cells in other rows do not affect column widths. If no widths are present on the first row, the column widths are divided equally across the table according to the content of the table.
- initial: It is used to set an element’s CSS property to its default value.
- inherit: It is used to inherit a property to an element from its parent element property value.
Example: This example illustrates the use of the table-layout property where the values are assigned as auto & fixed.
Supported Browsers: The browser supported by the table-layout property are listed below:
- Google Chrome 14.0
- Internet Explorer 5.0
- Microsoft Edge 12.0
- Firefox 1.0
- Safari 1.0
- Opera 7.0