style.tableLayout (Property)

Controls how the browser primarily works out table sizing and layout from the content or the sizing HTML tag attributes.


CSS level - 2
DOM level - 2
JavaScript - 1.5
JScript - 5.0
Internet Explorer - 5.0
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-myStyle.tableLayout
CSS syntax:table-layout: aType
Argument list:aTypeA kind of table layout to use

When you have a table in a document, it can take some time before the page content first appears. This is because the browser needs to traverse the entire table and load all its content so that it can work out the width and height of each cell and then sum them together to determine the overall size of the table.

This property provides a switch that enables the browser to use this normal technique or to use an accelerated method, whereby it takes the attributes that are specified with HTML tag attributes and immediately draws the table using those values.

This property accepts the auto and fixed keywords.

The auto keyword selects the normal table sizing and drawing method.

The fixed keyword allows the HTML tag attributes controlling the size to be used to draw the table outline, and the widths of the first row of cells are used to set the width of each columns. From there, the table can be lengthened to accommodate any textual content. You should make sure that there is enough size information in the first row of the table to allow it to establish realistic column widths. This means the columns in the first row should have a width equal to or greater than the width of any other cell in the remaining rows for optimum performance. This is less important when the table only contains text, but may be a problem for tables that partially use graphical content.

See also:TABLE object