Tables
Tables, tables, tables! Together with images, HTML tables are the black sheep of web design.
Regardless of being the black sheep, the power of tables is amazing. And if there's an HTML element that does its job well, very well, it's tables.
Let's dig in.
table-layout
The
table-layout
CSS property allows us to define the how HTML tables are laid out on the document, and it looks like this:
table-layout: fixed;
Description
There are two keyword values: auto
and fixed
.
auto
: This is the default value. Tables are automatically laid out by the browser this way without declaring anything in the CSS. The table cells adapt to the content inside of them; the behavior of table can sometimes be unpredictable.fixed
: By declaring the width of the table cells ...
Get Web Developer's Reference Guide 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.