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
| Job | Sheets |
|---|---|
| Cover proof | 24 |
Give a fixed-layout table an explicit width. Long cell contents may also need a wrapping or overflow rule.
<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
| Class | CSS declarations |
|---|---|
table-auto | table-layout: auto; |
table-fixed | table-layout: fixed; |
View full generated CSS
.table-auto {
table-layout: auto;
}
.table-fixed {
table-layout: fixed;
}