table-layout property changes the algorithm that is used for the layout of a table.
Below an example of two tables both set to
The table on the left has
table-layout: auto while the one on the right has
table-layout: fixed. The former is wider than the specified width (210px instead of 150px) but the contents fit. The latter takes the defined width of 150px, regardless if the contents overflow or not.
|auto||This is the default value. It defines the layout of the table to be determined by the contents of its' cells.|
|fixed||This value sets the table layout to be determined by the width property provided to the table. If the content of a cell exceeds this width, the cell will not resize but instead, let the content overflow.|