在标准的HTML下如何设置表格的高度(即代码中包含xhtml1-transitional.dtd)
蓝点天尊 2009-02-20 04:38:49 在如下代码中,表格第一行设置为30px我想让第二行占剩余的高度,结果在IE6.0中有问题,并不能按预期的设置显示,请朋友帮一下忙,注意网页中一定要包含
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
网页代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>无标题页</title>
<style type="text/css">
html, body, form{
margin:0;
padding:0;
border-style:none;
height:100%;
width: 100%;
}
.tableContainer
{
width:100%;
height:100%;
border-collapse:collapse;
}
.headerTr
{
height:30px;
}
.contentTr
{
}
</style>
</head>
<body >
<form id="form1" runat="server">
<table id="layoutContainer" border="1" cellpadding="0" cellspacing="0" class="tableContainer">
<tr class="headerTr">
<td>这是布局头内容<input id="Button1" type="button" value="button" /></td>
</tr>
<tr class="contentTr">
<td>
this a test!
</td>
</tr>
</table>
</form>
</body>
</html>