idty 发表于 2010-2-9 12:08:52

网页分辨率太大右边有空白


<p ><strong>zhoushixue</strong> 发表于 2010-2-3 16:37</p>
<h3>网页分辨率太大右边有空白</h3>大家好我是新手
想问下我做的网站分辨率大了右边就空白了全部左靠齐
大虾帮我看下http://hxlsgsmbsd.a69.huyi2.com/<p ><strong>DellGrass</strong> 发表于 2010-2-3 16:41</p>
在body里加一个div ,这个div要把其它的div全包起来。。
然后设置他的样式为width:1100px;margin:0 auto;position:realtive;


另外,怎么全用绝对定位,这样的页面能用???无法作到垂直方向自由伸展的....<p ><strong>zhoushixue</strong> 发表于 2010-2-3 16:50</p>
<h3>新手</h3>有时间的话教教我 刚学会<p ><strong>sophielifei</strong> 发表于 2010-2-3 17:45</p>
在最外面的DIV 设置边界 左右自动<p ><strong>happysoul</strong> 发表于 2010-2-3 22:30</p>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<title>居中</title>
<style>
*{margin:0px; padding:0px;}
.m_body{margin:0px auto; padding:0px; border:1px solid #999; width:800px; }
.a{height:200px;}

.m_body2{border:1px solid #999; width:800px; }
.a2{height:200px;}

</style>
</head>
<body>
    <br>
    <div class="m_body">
        <div class="a">这里面放你要的东西1<br>主要还是要页面最开始引入下面这个<br><br>
        <pre><font color="red">< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd" ></font></pre>
        </div>
    </div>
    <br>
    <center>
        <div class="m_body2">
            <div class="a2">这里面放你要的东西2<br>比较古老的方法 不是很好 全都居中了</div>
        </div>
    </center>

</body>
</html>

用楼主吊灯那个页面里的话说:真是让人想不到啊。。。

[ 本帖最后由 happysoul 于 2010-2-3 22:32 编辑 ]<p ><strong>zhangfeng0532</strong> 发表于 2010-2-4 11:10</p>
<h3>顶部的图片尺寸不和谐</h3>顶部的图片尺寸不和谐

页: [1]
查看完整版本: 网页分辨率太大右边有空白