So I have a table like this:
<table>
<tr>
<th>
<span>label1</span><br/>
<input type='text' placeholder='filter' />
</th>
<th>
<span>label2</span><br/>
<input type='text' placeholder='filter' />
</th>
</tr>
<tr>
<td>short</td>
<td>a very long one</td>
</tr>
</table>
How to make the input to auto-fit the content of the column, so that the short column will be small in width, and the column with long content will be stretch
already tried min-width: 4em
it still have fixed size for the input text.
tried with max-width: 4em
the size of td
still seems stretched even when all of other columns are short in width
width: 100%
on input
also didn't work
width: 0; min-width: 100%
also didn't work