Specifying the Width of a Column
Setting the overall table size is useful, but for more control, you might prefer to set the width of each column separately. To set the width of a column to a certain minimum amount, specify a width in the <td> tag for any cell within that column. You can use the same method you used for the <table> tag in the preceding section:
<td width="200px">
To specify the width of a column through a style sheet:
<td style="width: 200px">
The traditional place to set the column width is in the first row of the table, but that is not a requirement; you can set a width for any cell in any row. The column as a whole will be as wide as the widest cell in that column.
You can use either fixed amounts or percentages (of the table as ...
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