当前位置: 代码迷 >> ASP.NET >> 高度100%有关问题
  详细解决方案

高度100%有关问题

热度:122   发布时间:2013-02-26 00:00:00.0
高度100%问题.
<table   border= "1 "   style= "width:   100%;   height:   100% ">
          <tr>
                <td   style= "width:   100px ">
                </td>
            </tr>
</table>

宽度到时100%,而高度由于没有内容,只显示了一点高度,请问怎样才能在表格没内容的情况下,也能保证表格高度的100%

------解决方案--------------------------------------------------------
<table border= "1 " style= "width: 100%; height: 100% ">
<tr>
<td style= "width: 100px "> &nbsp;
</td>
</tr>
</table>

加空格
------解决方案--------------------------------------------------------
楼上正解
------解决方案--------------------------------------------------------
楼上的楼上正解
------解决方案--------------------------------------------------------
<table border= "1 " style= "width: 100%; height: 100% ">
<tr>
<td style= "width: 100%; height:100%; " nowrap= "nowrap "> <!--这句最关键-->
</td>
</tr>
</table>
------解决方案--------------------------------------------------------
要效果可以定如:height:600px
  相关解决方案