How do I specify in HTML or CSS that a table column should have the minimum width with respect to column content.
I have tried max-width but doesn’t work
.p
{
max-width:10px;
background-color:yellow;
}
<table> ...
<td nowrap class="p">text</td>
...<table>
did you try min-width instead? you used max-width in your CSS.