关于真个网页的居中问题,也许很白痴,但我小弟是菜鸟,请高手帮忙。

meiyan11 2003-10-18 09:30:10
下面是我的主页,我想让它居中,否则在800*600时正好,可是换到1024*768时就不居中了,

</head>

<frameset rows="125,*,22" framespacing="2" border="1" frameborder="0">
<frame name="top" scrolling="no" noresize target="contents" src="top2.htm">
<frameset cols="181,*">
<frame name="contents" target="main" src="new_page_1.htm" scrolling="no" noresize>
<frame name="main" src="middle/WebForm1.aspx" scrolling="auto">
</frameset>
<frame name="bottom" scrolling="no" noresize target="contents" src="botton.htm">
<noframes>
<body>

<p>此网页使用了框架,但您的浏览器不支持框架。</p>

</body>
</noframes>

请高手帮忙,代码怎么写啊?
...全文
63 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
casho 2003-10-18
  • 打赏
  • 举报
回复
水平居中的话很好做,如果想让它垂直居中的话,可以考虑用表格
zhangking 2003-10-18
  • 打赏
  • 举报
回复
我的代码:网页左右、上下 都居中:
<Table align=center border=1 CELLPADDING=0 CELLSPACING=0 width=100% height=100%>
<tr><td align=center>

<TABLE WIDTH=800 BORDER=0 CELLPADDING=0 CELLSPACING=0 valign=middle alian=center>
<TR><TD COLSPAN=2>。。。。。。</TD></TR>
</TABLE>

</td></tr>
</Table>
aBoris 2003-10-18
  • 打赏
  • 举报
回复
<body>
<div align="center">
<!--你的网页的代码--!>
</div>
</body>


snowskyplay 2003-10-18
  • 打赏
  • 举报
回复
<TABLE align=center bgColor=#6597d9 border=1 borderColor=#4f5469 cellPadding=5
cellSpacing=0 width=500>
<!--加入你的网页的代码
--!>
</TABLE>
用一个居中的表格定格你的网页框架,这样不管你是在1024*768还是800*600
都能显示居中的效果,
你最好用Dreamweaver对你的网页重新定格一下
angelheavens 2003-10-18
  • 打赏
  • 举报
回复
怎么没有,<IFRAME marginHeight=0 src="1.htm" frameBorder=0 noResize width=100% scrolling=no height=100%></IFRAME>

中1.htm是整个框架页(你设置框架边框,有边)就可以看到了
pgm.w918.com
meiyan11 2003-10-18
  • 打赏
  • 举报
回复
我不知道什么原因,各位上面说的办法我都试了,不行了,网页里什么都没有。

是什么原因啊?
flyflyfly_woo 2003-10-18
  • 打赏
  • 举报
回复
将整个页面放到表格中,再将表格居中就可以了
huhan3 2003-10-18
  • 打赏
  • 举报
回复
把table属性设置成align="center"
pysjf 2003-10-18
  • 打赏
  • 举报
回复
对啊!把整个也面都放到一个table里面 然后将起属性设定为居中!
angelheavens 2003-10-18
  • 打赏
  • 举报
回复
呵呵,最好的办法是在表格的基础上再用框架


<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.unnamed1 { overflow: hidden; position: absolute; visibility: visible; height: 600px; width: 800px; top: 0px; clip: rect( )}
-->
</style>
<body>
<center>
试试,我没有试呀
<TABLE align=center width=100% height="100%">
<TR>
<TD bgcolor="ff0000">
<IFRAME marginHeight=0 src="1.htm" frameBorder=0 noResize width=100% scrolling=no height=100%></IFRAME>


</TD>
</TR>
</TABLE></center>
</body>
zhaoliangpat 2003-10-18
  • 打赏
  • 举报
回复
dreamweaver 完全可以........
windancer 2003-10-18
  • 打赏
  • 举报
回复
把你所有的内容加到一个table里,然后把table属性设置成align="center"
meiyan11 2003-10-18
  • 打赏
  • 举报
回复
楼上的我试过了,不行啊,什么都没有。
yzwxjun 2003-10-18
  • 打赏
  • 举报
回复
</head>

<body>
<center>
<table><tr><td>
<frameset rows="125,*,22" framespacing="2" border="1" frameborder="0">
<frame name="top" scrolling="no" noresize target="contents" src="top2.htm">
<frameset cols="181,*">
<frame name="contents" target="main" src="new_page_1.htm" scrolling="no" noresize>
<frame name="main" src="middle/WebForm1.aspx" scrolling="auto">
</frameset>
<frame name="bottom" scrolling="no" noresize target="contents" src="botton.htm">
<noframes>
<p>此网页使用了框架,但您的浏览器不支持框架。</p>
</noframes>
</td></tr></table>
</body>

yanzy 2003-10-18
  • 打赏
  • 举报
回复
试试,我没有试呀
<TABLE align=center width=300>
<TR>
<TD bgcolor="ff0000">
<frameset rows="125,*,22" framespacing="2" border="1" frameborder="0">
<frame name="top" scrolling="no" noresize target="contents" src="top2.htm">
<frameset cols="181,*">
<frame name="contents" target="main" src="new_page_1.htm" scrolling="no" noresize>
<frame name="main" src="middle/WebForm1.aspx" scrolling="auto">
</frameset>
<frame name="bottom" scrolling="no" noresize target="contents" src="botton.htm">
<noframes>


</TD>
</TR>
</TABLE>

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧