The height of the stretch field to fill the table cell

How do you stretch the input field to the height of the table cell using simple css for ie8?

<table> <tr> <td>line1<br />line2</td> <td><input type = "text" /></td> </tr> </table> 

height:100% at the input does not work, and does not combine with:

  height:inherit; display:inline-block; position:relative; 

If no answer is possible then this is normal, I will do some jquery together to do this.

+7
source share
2 answers

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

+1
source

Add height:100%; to your input and set the height of the td tag as a percentage

-1
source

All Articles