我在表格單元格內有一個表格。子表格高度必須與父元素高度對齊。我將height="100%"
設置爲子表,但不起作用。桌面高度100%未設置爲父級高度
CSS
.outer{
border:1px solid black;
border-collapse:collapse;
}
.inner{
border:1px solid red;
height:100%;
width:auto;
}
HTML
<table class="outer">
<tr>
<td>
<!-- Content Here -->
</td>
<td>
<table class="inner">
<tr>
<td>
<!-- Content Here -->
</td>
</tr>
</table>
</td>
</tr>
</table>
它適用於IE,但不適用於其他瀏覽器 – 2013-02-27 11:30:33
添加:display:block; .inner類可以在所有瀏覽器中使用。 – Aratidgr8 2013-02-27 11:52:02
不..它不工作。 – 2013-02-27 11:54:40