div+css 居中问题

来源:百度知道 编辑:UC知道 时间:2024/05/18 06:23:35
这是我用PS切割保存的WEB页面 但不知道怎么才能使网页居中 寻求帮助
字节限制 已取消部分图片<html>
<head>
<title>psweb</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!-- ImageReady Styles (psweb.psd) -->
<style type="text/css">
<!--

#__01 {
position:absolute;
left:0px;
top:0px;
width:1024px;
height:1300px;
}

#psweb-01 {
position:absolute;
left:0px;
top:0px;
width:1024px;
height:238px;
}

#psweb-02 {
position:absolute;
left:0px;
top:238px;
width:105px;
height:346px;
}

#psweb-03 {
position:absolute;
left:105px;
top:238px;
width:162px;
height:54px;
}

#psweb-04 {
position:absolute;
left:267px;
top:238px;
width:161px;
height:57px;
}

#psweb-05 {
position:

<div style="margin:0px auto;">这样DIV就居中了</div>
<div style=" text-align:center"><img src="images/psweb_10.gif" width="54" height="318" alt=""> 这样DIV里的图片就居中了</div>

align:center

晕呀,这是什么东西呀,没见过这么乱的DIV,你把你的定位去掉,
要把TOP和LEFT都去掉,

taogo229鄙视你呀,~~~没技能也在这里回答,
回去多看看关于W3C标准的书呀~~~
真如楼下所说真是误人子弟,

www.makewing.com 上面有一般常用标准物命名~

今天才看见有这么牛的DIV+CSS,我都无语了,

问的人不懂,这谁也说不了什么。

回答者:taogo229 你懂什么叫语法吗?懂什么叫格式吗?

真是误人子弟害人不浅啊。

就是几张图片让他集中对齐,有必要用这么多容器吗?更没有必要把每个图片都定义TOP和LEFT。

最最重要的就是你的ID名字用的都不规范<div id="__01">
有这么用的吗?