Any way to synchronize table column widths with HTML + CSS?

If you’re not too picky about which column widths the browser comes up with, as long as they’re the same across different tables, you can use the CSS table-layout property (supported by all major browsers) in combination with a table width:

table {
    table-layout: fixed;
    width: 100%;
}

This causes all columns (without a specified width) to have the same width, regardless of the table content.

Leave a Comment