当前位置: 代码迷 >> HTML/CSS >> XHTML +CSS 表格高度有关问题
  详细解决方案

XHTML +CSS 表格高度有关问题

热度:72   发布时间:2012-03-17 19:06:27.0
XHTML +CSS 表格高度问题
<table>
                        <tr   style= "height:   80px; ">
                                <td>
                                </td>
                        </tr>
                        <tr   style= "height:   100%; ">
                                <td>
                                </td>
                        </tr>
                </table>
在html   4.0中,第二行的高度会是剩余高度的100%,

而在xhtml中,第二行的高度却是整个页面高度的100%.如果想只让它占剩余空间的100%要怎么写呢?

刚开始学习,有些不明白,请指教.


------解决方案--------------------
100%改auto试试。
------解决方案--------------------
<table style= "100%; "> //这儿也设高度
<tr style= "height: 80px; " nowrap=nowrap> //加上nowrap=nowrap
<td>
</td>
</tr>
<tr style= "height: 100%; ">
<td>
</td>
</tr>
</table>