网页中的table 的height=100%无效, 加了<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">后,网页中的table 的height=100%无效,晕 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在源代码中.<table style="height:100%">你是这样写的么???? <table height="100%"><table style="height:100%"> <table class="height">.height{height:100%} 你到是把你table定义的代码发来啊,发那个有什么用啊 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %><!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></head><body> <form id="form1" runat="server"> <table style="width:100%; height:100%; border:1px solid #000;"> <tr><td>aaaa</td></tr> </table> </form></body></html>把下面的代码去掉就正常了,否则table不能100%高度<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 你不设高度,默认高度就可以了。或者height:auto; dtd就是这样的,没办法 啊,呵呵,除非父容器有具体的高度,否则100%是无效的。 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %><!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></head><body> <form id="form1" runat="server"> <table style="width:100%; height:auto; border:1px solid #000;"> <tr><td>aaaa</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></head><body> <form id="form1" runat="server"> <table style="width:100%; height:auto; border:1px solid #000;"> <tr><td>aaaa</td></tr> </table> </form></body></html> 不行你就这样。先用dw把你的界面做好然后拷贝到.net里面这样就不会乱了 一样的,无论在哪里做,只要加下面这句话,都不行的<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 在Table外放一个Div,把高度设高一些 找到解决办法了,只要加入下面css代码就可以html,body{height:100%;} IE6使用Uploadify老是会报错。 下拉列表级联以及在GridView组件中显示的问题 ajax 返回历史记录 服务器端textbox得到焦点的事件(在线急等) 问一下关于数据库查询的问题 SOS!如何解决:程序集清单定义与程序集引用不匹配 当有很多请求同时发生时,那些因素会导致web application的响应速度变慢? JS怎么访问DataList控件里面的控件 如何在代码中改变page的标题? 关于dataGrid的Template Column中使用EditItemTemplate的问题。 选定gridview的一行使其变色 问个问题...高手来帮我看看,谢谢
<table style="height:100%">你是这样写的么????
<table class="height">.height
{
height:100%
}
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %><!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>
</head>
<body>
<form id="form1" runat="server">
<table style="width:100%; height:100%; border:1px solid #000;">
<tr><td>aaaa</td></tr>
</table>
</form>
</body>
</html>把下面的代码去掉就正常了,否则table不能100%高度
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<table style="width:100%; height:auto; border:1px solid #000;">
<tr><td>aaaa</td></tr>
</table>
</form>
</body>
</html>
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<table style="width:100%; height:auto; border:1px solid #000;">
<tr><td>aaaa</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">