17.2. Table Layout

Typically, the user agent is in charge of how to render the table to best fit its platform's display based in part on the contents of cells and in part on the default table rendering settings of the platform. You can force the user agent to render the table using only the width values of its elements by using the table-layout property. This property has the following syntax:

table-layout:  auto | fixed;

Setting the property value to auto (the default) allows the user agent to consider the contents of the table cells when formatting the table. Setting the property's value to fixed causes the user agent to disregard the contents of the table and format it only according to explicit width values given within the document (via CSS) or the table itself (CSS or tag attributes).

Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.