您的位置:首页 > 其它

解决由于DTD规范引发Table设置高度无效

2010-02-21 15:56 1436 查看
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!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 runat="server">
<title>无标题页</title>
<style type="text/css">
html,body
{
padding:0px;
margin:0px;
height:95%;
width:100%;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<table id="textTable" style="height: 100%; width: 100%;" border="1">
<tr style="height: 20%">
<td>
20%
</td>
</tr>
<tr style="height: 60%">
<td>
60%
</td>
</tr>
<tr style="height: 20%">
<td>
20%
</td>
</tr>
</table>
</form>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: