How do you make an input field stretch to the height of a table's cell using plain css for ie8?
<table>
<tr>
<td>line1<br />line2</td>
<td><input type = "text" /></td>
</tr>
</table>
height:100%
on the input does not work and neither does a combination of:
height:inherit;
display:inline-block;
position:relative;
If the answer is you cannot, then that is fine, i'll put some jquery together to do it.
Add padding:0
to td and height:100%
to input
input {
height:100%;
display:inline-block;
position:relative;
}
td {
border:solid green 1px;
background:pink;
padding:0;
}
DEMO
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With