解决由于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>
<!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>
相关文章推荐
- 由于TableView的Section的头部和尾部高度设置的不规范引起的部分Section中的图片无法正常显示
- 设置div table 等元素高度宽度百分之一百 100% 无效解决办法...
- table和div设置height:100%无效的完美解决方法
- [转]table和div设置height:100%无效的完美解决方法
- 表格Table宽度设置无效的解决方法
- table和div设置height:100%无效的完美解决方法
- 怎样解决在ie中table 的th td设置宽高度不起作用
- 怎样解决在ie中table 的th td设置宽高度不起作用
- 解决table设置宽度无效的问题
- ios开发之--ios11适配:TableView的heightForHeaderInSection设置高度无效/UISearchBar消失
- 解决table设置了table-layout:fixed后单,元格宽度设置无效的方法
- table和div设置height:100%无效的完美解决方法
- iOS11 设置tableview的header或者footer高度无效的问题
- 如何设置tableView的组的头视图的高度?为什么你设置的tableView的组的头视图的高度无效呢?
- android 解决vedeoView设置高度无效的问题
- 解决iFrame 高度设置100%无效的一种方式
- table和div设置height:100%无效的完美解决方法
- table和div设置height:100%无效的完美解决方法
- 【android】解决Viewpager设置高度为wrap_content无效的方法
- 为table-row设置border无效解决办法