Specifying the Size of a Table
By default, a table sizes itself to accommodate all its cells, and each cell’s height and width changes to accommodate the largest entry in that row or column. The table structure expands or contracts as needed when you add or remove cells or content within cells.
With these default settings, a table can end up looking rather cramped, especially if you don’t use borders between cells (which you’ll learn about in Chapter 12). In the following table, for example, some extra space would be welcome.
One way to add extra spacing in this instance would be to set the overall size of the table to 100 percent. This forces the table to expand horizontally to fill the available space in the browser window. To do this, add a ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access