I don’t know what to call it when the columns’ width of a table are equal to the largest cell’s width in that column, but I want to know if it is possible to achieve it using anything like flex
or grid
?
table,
td {
border-collapse: collapse;
border: 1px solid;
}
td {
font-family: "Courier New", monospace;
padding: 0.25em;
}
<table>
<tr>
<td>y</td>
<td>sin(x)*cos(x)</td>
</tr>
<tr>
<td>f(x)</td>
<td>tan(x)</td>
</tr>
</table>
2
Answers