css - How to prevent <input> from stretching table cell? -
<table border=1> <tr> <th>one</th> </tr> <tr> <td>1</td> </tr> </table>
draws table bit wider word "one", , it's ok.
<table border=1> <tr> <th>one</th> </tr> <tr> <td style='padding:0 0 0 0'> <input style='width:100%' value='1'> </td> </tr> </table>
draws table 4 times wider needed.
please advise how make width of input equal 100% of non-stretched td without assigning width of td itself?
you can add size
attribute input. example:
<table border=1> <tr> <th>one</th> </tr> <tr> <td style='padding:0 0 0 0'> <input size='1' value='1'> </td> </tr> </table>
Comments
Post a Comment