So I have a table with this style:
table-layout: fixed;
Which makes all columns to be of the same width. I would like to have one column (t
You could just give the first cell (therefore column) a width and have the rest default to auto
table {
table-layout: fixed;
border-collapse: collapse;
width: 100%;
}
td {
border: 1px solid #000;
width: 150px;
}
td+td {
width: auto;
}
150px
equal
equal
or alternatively the "proper way" to get column widths might be to use the col element itself
table {
table-layout: fixed;
border-collapse: collapse;
width: 100%;
}
td {
border: 1px solid #000;
}
.wide {
width: 150px;
}
150px
equal
equal