| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1340 人关注过本帖
标题:div布局的问题,请教各路高手啊
取消只看楼主 加入收藏
douzi
Rank: 1
等 级:新手上路
帖 子:71
专家分:0
注 册:2005-12-15
收藏
 问题点数:0 回复次数:9 
div布局的问题,请教各路高手啊
我用div布局的
具体情况是这样的,我在一个页面里面调用了三个页面
<!--#include file="conn.asp"-->
<!--#include file="top.asp"-->
<!--#include file="body.asp"-->
top页面里面只有一个div是这样的
<div id="top" align="center" style="position:absolute;top:0;left:114;width:779;height:98;z-index:1;">
body页面也只有一个div
<div id="body"aligh="center"
style="position:absolute;visibility:inherit; width:779; height:auto; z-index:1; left:114; top:98;
background-color:#063C93;border: 1px none #000000;">

为什么left:114好象没用``````用iis打开的时候总是靠到最左边```

[此贴子已经被作者于2005-12-18 12:10:48编辑过]

搜索更多相关主题的帖子: div布局 top body 
2005-12-18 10:50
douzi
Rank: 1
等 级:新手上路
帖 子:71
专家分:0
注 册:2005-12-15
收藏
得分:0 

我晕,怎么都没人来呢`````帮我啊`


2005-12-18 12:35
douzi
Rank: 1
等 级:新手上路
帖 子:71
专家分:0
注 册:2005-12-15
收藏
得分:0 

这个是conn.asp文件
<%
dim conn,rs'定义变量
'dim filepath'定义变量
'filepath="./douzi.mdb"'定义数据库连接路径
set conn=server.createobject("adodb.connection")'建立数据库ADO连接对象
conn.open="provider=microsoft.jet.oledb.4.0;data source= "&server.mappath("douzi.mdb")
'Response.Write Server.MapPath("douzi.mdb") & "<br>"'用于检测连接是否成功
'Response.Write "数据库连接成功: " & Conn.State & "<br>"
sub endConnection()
conn.close
set conn=nothing
end sub
set rs=conn.execute("select * from douzi")
%>

下面是write.asp
<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>我要留言</title>
</head>
<!--#include file="top.asp"-->
<body>
<div
id="write"aligh="center" style="position:absolute;visibility:inherit; width:779; height:auto; z-index:1; left:114;top:98;
background-color:#063C93;border: 1px none #000000;">
<table width="779" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><a href='注册也面' target='_blank'>
<FONT style="FONT-SIZE: 17px;COLOR:#820242;FONT-FAMILY: 华文行楷"><B><center>免费注册</center></B><FONT></a></td>
<td><a href='注册也面' target='_blank'>
<FONT style="FONT-SIZE: 17px;COLOR:#A536F5;FONT-FAMILY: 华文行楷"><B><center>会员登陆</center></B><FONT></a></td>
<td><a href='write.asp' target='_blank'>
<FONT style="FONT-SIZE: 17px;COLOR:#FBAD39;FONT-FAMILY: 华文行楷"><B><center>签写留言</center></B><FONT></a></td>
<td><a href='注册也面' target='_blank'>
<FONT style="FONT-SIZE: 17px;COLOR:#F3E032;FONT-FAMILY: 华文行楷"><B><center>联系站长</center></B><FONT></a></td>
</tr>
</table>

<table width="779" cellspacing="1" border="0" bgcolor="#3366FF">
<form name="writeform" method="post" action="add.asp">
<tr><td bgcolor="#FFFFFF"><font style="font-size:15px;font-family:新宋体">用户名:
<input type="text" name="user" size="12" maxlength="20" id="user"></font></td>
<td bgcolor="#FFFFFF" height="10">
<p><label><font style="font-size:15px;font-family:新宋体">性别:
<select name="sex" id="sex"><option value="男">男</option><option value="女">女</option><option value="其他">其他</option>
</select></font></label></p></td>
<td bgcolor="#FFFFFF"><font style="font-size:15px;font-family:新宋体">时间:
<input type="text" name="time" size="12" maxlength="20"></font></td>
<td bgcolor="#FFFFFF"><font style="font-size:15px;font-family:新宋体">信箱:
<input type="text" name="email" size="12" maxlength="20" id="email"></font></td>
<td bgcolor="#FFFFFF"><font style="font-size:15px;font-family:新宋体">qq:
<input type="text" name="qq" size="12" maxlength="20" id="qq"></font></td>
</tr>
<table width="779" cellspacing="1" border="0" bgcolor="#3366FF">
<tr><td bgcolor="#FFFFFF"><font style="font-size:17px;font-family:华文行楷">主题:
<input type="text" name="title" size="40" maxlength="20" id="title"></font></td></tr>
<tr><td bgcolor="#FFFFFF"><font style="font-size:17px;font-family:华文行楷">内容:</font></td></tr>
<tr><td bgcolor="#FFFFFF">
<textarea cols=108 rows=8 name="content" id="content" style="overflow:auto;background-color:#888CBD;wrap:auto;border-width:0px"
font style="font-size:14px"></textarea>
</td></tr>
<tr bgcolor="#FFFFFF">
<td colspan="2"><div align="center"><input type="submit" name="Submit" value="提交"><input type="reset" name="Submit" value="重置">
</div></td>
</tr>
</table>
</form>
</table>
<hr align="center" size="0">
</div>
</body>
</html>

用iis打开write.asp文件的时候整个页面在最左边
而如果我把conn.asp文件中'Response.Write Server.MapPath("douzi.mdb") & "<br>"'用于检测连接是否成功这一句前的’去掉,就是让他显示出我的数据库access文件路径,或者随便换一句Response.Write "1",这样就在最左上端显示1,然后其他整个我需要的页面是居中显示的,或者说left:114就生效了`````

不懂怎么弄啊,这个是什么问题呢


2005-12-18 20:31
douzi
Rank: 1
等 级:新手上路
帖 子:71
专家分:0
注 册:2005-12-15
收藏
得分:0 

D:\dasan大三上\CSB实训\B\我的留言板\douzi.mdb<br>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>我要留言</title>
</head>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
</head>
<body>
<div id="top" align="center" style="position:absolute;left:114;top:0;width:779;height:98;z-index:1;">
<table width="779" height="98" border="0" background="top_img1.gif">
<td align="left" valign="top">
<marquee behavior=scroll style="color:#6600FF;font-size:13px;"direction="left" scrollamount="3" scrolldelay="2"
onMouseOver="this.scrollDelay=250" onMouseOut="this.scrollDelay=1"><p>歡迎光臨桂林电子工业学院热水供应系统!</p>
</marquee> </td>
</table>
</div>
</body>
</html>

<body>
<div
id="write"aligh="center" style="position:absolute;visibility:inherit; width:779; height:auto; z-index:1; left:114;top:98;
background-color:#063C93;border: 1px none #000000;">
<table width="779" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><a href='注册也面' target='_blank'>
<FONT style="FONT-SIZE: 17px;COLOR:#820242;FONT-FAMILY: 华文行楷"><B><center>免费注册</center></B><FONT></a></td>
<td><a href='注册也面' target='_blank'>
<FONT style="FONT-SIZE: 17px;COLOR:#A536F5;FONT-FAMILY: 华文行楷"><B><center>会员登陆</center></B><FONT></a></td>
<td><a href='write.asp' target='_blank'>
<FONT style="FONT-SIZE: 17px;COLOR:#FBAD39;FONT-FAMILY: 华文行楷"><B><center>签写留言</center></B><FONT></a></td>
<td><a href='注册也面' target='_blank'>
<FONT style="FONT-SIZE: 17px;COLOR:#F3E032;FONT-FAMILY: 华文行楷"><B><center>联系站长</center></B><FONT></a></td>
</tr>
</table>

<table width="779" cellspacing="1" border="0" bgcolor="#3366FF">
<form name="writeform" method="post" action="add.asp">
<tr><td bgcolor="#FFFFFF"><font style="font-size:15px;font-family:新宋体">用户名:
<input type="text" name="user" size="12" maxlength="20" id="user"></font></td>
<td bgcolor="#FFFFFF" height="10">
<p><label><font style="font-size:15px;font-family:新宋体">性别:
<select name="sex" id="sex"><option value="男">男</option><option value="女">女</option><option value="其他">其他</option>
</select></font></label></p></td>
<td bgcolor="#FFFFFF"><font style="font-size:15px;font-family:新宋体">时间:
<input type="text" name="time" size="12" maxlength="20"></font></td>
<td bgcolor="#FFFFFF"><font style="font-size:15px;font-family:新宋体">信箱:
<input type="text" name="email" size="12" maxlength="20" id="email"></font></td>
<td bgcolor="#FFFFFF"><font style="font-size:15px;font-family:新宋体">qq:
<input type="text" name="qq" size="12" maxlength="20" id="qq"></font></td>
</tr>
<table width="779" cellspacing="1" border="0" bgcolor="#3366FF">
<tr><td bgcolor="#FFFFFF"><font style="font-size:17px;font-family:华文行楷">主题:
<input type="text" name="title" size="40" maxlength="20" id="title"></font></td></tr>
<tr><td bgcolor="#FFFFFF"><font style="font-size:17px;font-family:华文行楷">内容:</font></td></tr>
<tr><td bgcolor="#FFFFFF">
<textarea cols=108 rows=8 name="content" id="content" style="overflow:auto;background-color:#888CBD;wrap:auto;border-width:0px"
font style="font-size:14px"></textarea>
</td></tr>
<tr bgcolor="#FFFFFF">
<td colspan="2"><div align="center"><input type="submit" name="Submit" value="提交"><input type="reset" name="Submit" value="重置">
</div></td>
</tr>
</table>
</form>
</table>
<hr align="center" size="0">
</div>
</body>
</html>
是这个么?我用查看源文件从记事本里面复制的``


2005-12-18 20:41
douzi
Rank: 1
等 级:新手上路
帖 子:71
专家分:0
注 册:2005-12-15
收藏
得分:0 
怎么调啊,我是整个页面就一个div的啊``````
页面中包括一个conn.asp文件,然后包括一个top.asp文件,top.asp文件也是从body开始就一个div,然后内容全部在div里面,然后这个页面也是从body开始就写入一个div,一直到</body>之前</div>这样的````

2005-12-18 20:54
douzi
Rank: 1
等 级:新手上路
帖 子:71
专家分:0
注 册:2005-12-15
收藏
得分:0 

麻烦指导一下啊```
D:\dasan大三上\CSB实训\B\我的留言板\douzi.mdb<br><title>top</title>
<div id="top" align="center" style="position:absolute;left:114;top:0;width:779;height:98;z-index:1;">
<table width="779" height="98" border="0" background="top_img1.gif">
<td align="left" valign="top">
<marquee behavior=scroll style="color:#6600FF;font-size:13px;"direction="left" scrollamount="3" scrolldelay="2"
onMouseOver="this.scrollDelay=250" onMouseOut="this.scrollDelay=1"><p>歡迎光臨桂林电子工业学院热水供应系统!</p>
</marquee> </td>
</table>
</div>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>我要留言</title>
</head>

<body>
<div
id="write"aligh="center" style="position:absolute;visibility:inherit; width:779; height:auto; z-index:1; left:114;top:98;
background-color:#063C93;border: 1px none #000000;">
<table width="779" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><a href='注册也面' target='_blank'>
<FONT style="FONT-SIZE: 17px;COLOR:#820242;FONT-FAMILY: 华文行楷"><B><center>免费注册</center></B><FONT></a></td>
<td><a href='注册也面' target='_blank'>
<FONT style="FONT-SIZE: 17px;COLOR:#A536F5;FONT-FAMILY: 华文行楷"><B><center>会员登陆</center></B><FONT></a></td>
<td><a href='write.asp' target='_blank'>
<FONT style="FONT-SIZE: 17px;COLOR:#FBAD39;FONT-FAMILY: 华文行楷"><B><center>签写留言</center></B><FONT></a></td>
<td><a href='注册也面' target='_blank'>
<FONT style="FONT-SIZE: 17px;COLOR:#F3E032;FONT-FAMILY: 华文行楷"><B><center>联系站长</center></B><FONT></a></td>
</tr>
</table>

<table width="779" cellspacing="1" border="0" bgcolor="#3366FF">
<form name="writeform" method="post" action="add.asp">
<tr><td bgcolor="#FFFFFF"><font style="font-size:15px;font-family:新宋体">用户名:
<input type="text" name="user" size="12" maxlength="20" id="user"></font></td>
<td bgcolor="#FFFFFF" height="10">
<p><label><font style="font-size:15px;font-family:新宋体">性别:
<select name="sex" id="sex"><option value="男">男</option><option value="女">女</option><option value="其他">其他</option>
</select></font></label></p></td>
<td bgcolor="#FFFFFF"><font style="font-size:15px;font-family:新宋体">时间:
<input type="text" name="time" size="12" maxlength="20"></font></td>
<td bgcolor="#FFFFFF"><font style="font-size:15px;font-family:新宋体">信箱:
<input type="text" name="email" size="12" maxlength="20" id="email"></font></td>
<td bgcolor="#FFFFFF"><font style="font-size:15px;font-family:新宋体">qq:
<input type="text" name="qq" size="12" maxlength="20" id="qq"></font></td>
</tr>
<table width="779" cellspacing="1" border="0" bgcolor="#3366FF">
<tr><td bgcolor="#FFFFFF"><font style="font-size:17px;font-family:华文行楷">主题:
<input type="text" name="title" size="40" maxlength="20" id="title"></font></td></tr>
<tr><td bgcolor="#FFFFFF"><font style="font-size:17px;font-family:华文行楷">内容:</font></td></tr>
<tr><td bgcolor="#FFFFFF">
<textarea cols=108 rows=8 name="content" id="content" style="overflow:auto;background-color:#888CBD;wrap:auto;border-width:0px"
font style="font-size:14px"></textarea>
</td></tr>
<tr bgcolor="#FFFFFF">
<td colspan="2"><div align="center"><input type="submit" name="Submit" value="提交"><input type="reset" name="Submit" value="重置">
</div></td>
</tr>
</table>
</form>
</table>
<hr align="center" size="0">
</div>
</body>
</html>

这个应该是了吧````
文件开头两行是这样的
<!--#include file="conn.asp"-->
<!--#include file="top.asp"-->


2005-12-18 21:02
douzi
Rank: 1
等 级:新手上路
帖 子:71
专家分:0
注 册:2005-12-15
收藏
得分:0 
griefforyou还在么,帮我啊```多谢拉`

2005-12-18 21:28
douzi
Rank: 1
等 级:新手上路
帖 子:71
专家分:0
注 册:2005-12-15
收藏
得分:0 
我晕```老大```我也怎么办啊,我现在也在搜索答案,就是找不到啊```帮帮我啊

2005-12-18 22:40
douzi
Rank: 1
等 级:新手上路
帖 子:71
专家分:0
注 册:2005-12-15
收藏
得分:0 

不是想让他固顶,是想让他居中啊```麻烦指导一下,谢谢拉


2005-12-20 10:19
douzi
Rank: 1
等 级:新手上路
帖 子:71
专家分:0
注 册:2005-12-15
收藏
得分:0 

哈哈,我搞定了,可能是我问的问题不清楚```我把包含文件全部放到第一行,第二行,这样了,嘿嘿```


2005-12-20 10:37
快速回复:div布局的问题,请教各路高手啊
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022667 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved