Consider this table:
<table style="width: 100%">
<tr>
<td>Static length</td>
<td>Static length</td>
<td><div>Length varies</div></td>
<td>Space filler</td>
</tr>
<tr>
...
</tr>
</table>
How can I make the 3rd column to take the minimum width (depending on its content) and the 4th column to take the rest?
Use this
td:nth-child(3){
background:red;
width: 1px;
white-space: nowrap;
}
DEMO
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With