html - TD width - the minimum needed using CSS -


consider 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 make 3rd column take minimum width (depending on content) , 4th column take rest?

use this

td:nth-child(3){     background:red;     width: 1px;     white-space: nowrap; } 

demo


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -