给定以下html示例,如何使绝对定位的div高度等于表格单元格的高度。这仅是IE浏览器的问题。
注意:该div不能影响单元格内容,因此采用绝对定位,并且行样式必须定义高度。
<html>
<table>
<tr style="height:100px;">
<td style="position:relative;width:200px;background-color:green;border:solid 2px green;">
<div style="position:absolute;background-color:red;width:100%;height:100%;top:0px;left:0px;"></div>
xyz
</td>
</tr>
</table>
</html>