读书人

div 撑大的有关问题解决之后马上给分

发布时间: 2012-02-21 16:26:23 作者: rapoo

div 撑大的问题,在线等,解决之后马上给分。
代码如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="news.aspx.cs" Inherits="view_news" %>

<!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>0476广告网信息页</title>
<style type="text/css">
body {text-align:center}
#outer {
width:84%;
z-index:1;
background:#ffffff;
margin:auto;
text-align:center;
height: 1000px;
position: relative;
}
.style1
{
width: 59px;
}
</style>
</head>
<body style="background-image:url(../images/beijing_02.jpg.jpg)">
<form id="form1" runat="server">
<div id="outer">


<table border=1 id="t1" style="width:100%; top:31%; position:absolute; left: 2px;">
<tr><td>
<div id="d1" runat="server" style="z-index: 105; left: 1%; width: 98%; position: absolute; top: 4px;"></div>
</td></tr>
<tr><td style="height:200px;">
<div style="z-index: 106; left: 1%; width: 98%; position: absolute; top: 30px;
height: 174px; border-right: gainsboro 1px solid; border-top: gainsboro 1px solid; border-left: gainsboro 1px solid; border-bottom: gainsboro 1px solid;">
<asp:Label ID="Label2" runat="server" Font-Size="Smaller" Style="z-index: 100; left: 7px;
position: absolute; top: 6px" Text="留言板"></asp:Label>
<table style="width: 99%; top:10%; position:absolute; left: 1px; font-size:small">
<tr><td class="style1" align=center>留言</td><td align=left>
<textarea id="TextArea1" cols="20" rows="2" name="S1" style="height:90px; width:80%;"></textarea>
</td></tr>
<tr><td class="style1" align=center>留言人 </td>
<td align=left><input id="Text1" type="text" style="width:40%"/></td></tr>
<tr><td class="style1"></td><td align=left>
<input id="Button3" type="button" value="提交" style="height:20px; width:40px" onclick="save()" /></td></tr>
</table>
</div></td></tr>
<tr><td style="height:200px;">
<div style="z-index: 106; left: 1%; width: 98%; position: absolute; top: 230px;
height: 174px; border-right: gainsboro 1px solid; border-top: gainsboro 1px solid; border-left: gainsboro 1px solid; border-bottom: gainsboro 1px solid;">
<asp:Label ID="Label3" runat="server" Font-Size="Smaller" Style="z-index: 100; left: 7px;
position: absolute; top: 6px" Text="备注:投资有风险,请细致咨询,以便成功加盟。请投资者对项目做详细的实地考查,本网站对投资者的投资风险概不负法律责任"></asp:Label>
<asp:Label ID="Label5" runat="server" Font-Size="Smaller" Style="z-index: 101; left: 142px;


position: absolute; top: 70px" Text="联系电话:0476-8888888"></asp:Label>
<asp:Label ID="Label6" runat="server" Font-Size="Smaller" Style="z-index: 103; left: 310px;
position: absolute; top: 70px" Text="ICP备案号:京ICP070508"></asp:Label>
</div></td></tr></table>
</div>
</form>
</body>
</html>
<script>
function save()
{ document.getElementById("d1").innerHTML+="第如第一个div为top,第二个为bottom,一个在上,一个在下,";
document.getElementById("d1").innerHTML+="<p>top的内容不固定,所以height不好固定";
document.getElementById("d1").innerHTML+="<p>bottom因此显示的时候,总是与top重叠";
document.getElementById("d1").innerHTML+="<p>如何让top自适应内容的高度?第如第一个div为top,第二个为bottom,一个在上,一个在下,";
document.getElementById("d1").innerHTML+="<p>top的内容不固定,所以height不好固定";
document.getElementById("d1").innerHTML+="<p>bottom因此显示的时候,总是与top重叠";
document.getElementById("d1").innerHTML+="<p>如何让top自适应内容的高度?第如第一个div为top,第二个为bottom,一个在上,一个在下,";
document.getElementById("d1").innerHTML+="<p>top的内容不固定,所以height不好固定";
document.getElementById("d1").innerHTML+="<p>bottom因此显示的时候,总是与top重叠";
document.getElementById("d1").innerHTML+="<p>如何让top自适应内容的高度?第如第一个div为top,第二个为bottom,一个在上,一个在下,";
document.getElementById("d1").innerHTML+="<p>top的内容不固定,所以height不好固定";
document.getElementById("d1").innerHTML+="<p>bottom因此显示的时候,总是与top重叠";
document.getElementById("d1").innerHTML+="<p>如何让top自适应内容的高度?第如第一个div为top,第二个为bottom,一个在上,一个在下,";
document.getElementById("d1").innerHTML+="<p>top的内容不固定,所以height不好固定";
document.getElementById("d1").innerHTML+="<p>bottom因此显示的时候,总是与top重叠";
document.getElementById("d1").innerHTML+="<p>如何让top自适应内容的高度?第如第一个div为top,第二个为bottom,一个在上,一个在下,";
document.getElementById("d1").innerHTML+="<p>top的内容不固定,所以height不好固定";
document.getElementById("d1").innerHTML+="<p>因此显示的时候,总是与top重叠";
document.getElementById("d1").innerHTML+="<p>top自适应内容的高度?";
}
</script>


我在点击提交按钮时 为什么我的表格不跟着变大呢?
如果我在后台写 this.di.innerHTML +=”省略不写了,反正就是很多东西“ 也不变大啊!
请大家帮忙,指教,谢谢!!!

[解决办法]
我知道!有法解的。
csdn都存在。

[解决办法]
呵呵。我来了。你不要用百分比。用像素控制死,百分比那是小网站的用法。我上吃次就这样。
[解决办法]
用绝对值控制!
[解决办法]
记得结贴

读书人网 >asp.net

热点推荐