日期:2014-05-17  浏览次数:20645 次

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>