Browse documentation

Reference / Tables

Table layout

Choose whether the browser sizes columns from their contents or follows widths established by the table and its first row.

Working example

Give a fixed-layout table an explicit width. Long cell contents may also need a wrapping or overflow rule.

HTML
<table class="w-full table-fixed text-left">
  <thead><tr><th class="w-2/3 border-b p-2">Job</th><th class="border-b p-2">Sheets</th></tr></thead>
  <tbody><tr><td class="p-2">Cover proof</td><td class="p-2">24</td></tr></tbody>
</table>

Class reference

ClassCSS declarations
table-autotable-layout: auto;
table-fixedtable-layout: fixed;
View full generated CSS
Compiled CSS
.table-auto {
  table-layout: auto;
}
.table-fixed {
  table-layout: fixed;
}