Skip to: content, navigation

by Tommy Olsson and Paul O’Brien

table-layout (CSS property)

Browser support full matrix
IE5.5+ FF1+ Saf1.3+ Op9.2+
Full Full Full Full
Spec
Inherited Initial Version
No auto CSS2

Example

This style rule ensures that the table element with the ID "results" is laid out using the fixed layout algorithm:

#results {
  width: 24em;
  table-layout: fixed;
}

Try it yourself!View all demos

Description

This property specifies the layout algorithm that’s used to lay out a table or an inline table (an element whose display property has one of the values table or inline-table). Two table layout algorithms are available: automatic and fixed. See Table Formatting for details of these algorithms.

Note that the automatic algorithm will normally be used if the table’s width is specified as auto, although user agents are allowed (but not required) to attempt to use the fixed algorithm in these cases if so specified by the CSS author. This special case only applies to tables, however, not inline tables.

Value

auto
selects the automatic table layout algorithm
fixed
selects the fixed table layout algorithm, if applicable

Compatibility

IE5.5Full
6.0Full
7.0Full
Firefox1.0Full
1.5Full
2.0Full
Safari1.3Full
2.0Full
3.0Full
Opera9.2Full
9.5Full

Internet Explorer for Windows versions up to and including 7 don’t support the value inherit.

Related Reading

User-contributed notes

There are no comments yet.

Add a note

To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

Related Products

The Principles of Beautiful Web Design

Best Seller!

You don’t need to go to Art School to design great looking web sites!

Book Cover: The Principles of Beautiful Web Design

Download the FREE sample chapters