表高度100%在Div元素内 [英] Table Height 100% inside Div element
本文介绍了表高度100%在Div元素内的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hi我想设置表高度100%到其父div,没有定义高度在div。我的代码不工作。我不知道我失踪了。小提示链接
< ; div style =overflow:hidden>
< div style =float:left> a< br /> b< / div>
< table cellpadding =0cellspacing =0height =100%style =border:solid 1px#000000>
< tr>
< td valign =middle> c< / td>< / tr>
< / table>
< / div>
解决方案
p>
添加此
body,html {height:100%}
div {height:100%}
table {background:green; width:450px}
Hi I want to set table height 100% to its parent div without define height in div. My code is not working. I dont know what I am missing. Fiddle link
<div style="overflow:hidden">
<div style="float:left">a<br />b</div>
<table cellpadding="0" cellspacing="0" height="100%" style="border:solid 1px #000000">
<tr>
<td valign="middle">c</td></tr>
</table>
</div>
解决方案
Not possible without assigning height value to div.
Add this
body, html{height:100%}
div{height:100%}
table{background:green; width:450px}
这篇关于表高度100%在Div元素内的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文