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

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -