我在绝对定位的div里面有一张桌子.div使用top 0和bottom 0进行拉伸,看起来它像预期的跨浏览器一样延伸.(我检查过,我在它上面放了一个边框,它按预期拉伸).现在,在div里面我有一张桌子.我想让桌子在所有div空间上伸展,而在谷歌Chrome中则可以.但是在Internet Explorer和Firefox中没有,表格会延伸到宽度,但忽略高度属性,其高度由其内容决定.
有没有办法解决它,或以某种方式绕过它?
这是代码:
<div
style=
"position:absolute;
top:40px;
left:0px;
right:0px;
bottom:0px;">
<table
width="100%"
cellpadding="0"
cellspacing="0"
style="height:100%;">
</table>
</div>
Run Code Online (Sandbox Code Playgroud)