html - TD width not changing with input fields -
my goal make each td
have width of 100px should make input fields 100px. however, when added width="100"
td
, nothing happens. here's html code:
<table> <tr> <td>2.</td> <td width="100"> <input type="text" name="year2" id="year2" value="" /> </td> <td width="100"> <input type="text" name="make2" id="make2" value="" /> </td> <td width="100"> <input type="text" name="vin2" id="vin2" value="" /> </td> <td width="100"> <input type="text" name="radius2" id="radius2" value="" /> </td> <td width="100"> <input type="text" name="gvm2" id="gvm2" value="" /> </td> <td width="100"> <input type="text" name="comp2" id="comp2" value="" /> </td> <td width="100"> <input type="text" name="coll2" id="coll21" value="" /> </td> <td width="100"> <input type="text" name="amt2" id="amt2" value="" /> </td> </tr> </table>
here's link jsfiddle
i appreciate help.
the style should added on <input>
not on <td>
. should manage via css instead of using inline styles.
in css add
.my-width { width: 100px; }
then add class each of inputs:
<input class="my-width" type="text" name="year2" id="year2" value="" />
Comments
Post a Comment