我用的是css+div。在1024*768的分辨率是居中的,高分辨率下body居左。我需要的是高分也居中。请帮我看看我的代码那里写错了。
<link href="css/body.css" rel="stylesheet" type="text/css" />
body {margin-top: 0px;
margin-left:0px;
width: 1004px;
position: absolute; }
#Layer1 {position:absolute;
width:800px;
height:331px;
z-index:1;
left: 184px;
top: 40px;
margin-right: 0px;}
其中link里的css是:
.bg {background-image: url(../images/index_bg_02.png);
background-repeat: repeat
background-position: center center;
margin-top:0px;
margin-left:0px;
margin-right:0px;
height: 592px;
width: 1004px;}
#content{background-image:url(../images/index_content_bg_03.png);
margin-left:13px;
margin-right:14px;
height:444px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
margin-top: 58px;}
#login {font-size: 12px;
color: #666666;
float: left;
height: auto;
width: 161px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-style: solid;
position: relative;}
#login_logo {background-image: url(../images/index_10.png);
margin: 0px;
height: 45px;
width: 161px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-bottom-style: dashed;
position: relative;}
.login_table td {font-size: 12px;
color: #666666;
text-align: right;}
.login_table {height: auto;
width: 161px;
margin-top: 20px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-bottom-style: dashed;}
.denglu_table {margin-left: 2px;
margin-top: 0px;}
.login_bigpictd {border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-bottom-style: dashed;}
.regimg {margin-top: 6px;
margin-bottom: 6px;}
#logo {margin-top: 8px;
overflow: visible;
position: absolute;
margin-left: 13px;
left: 0px;
top: 0px;}
#news {left: 550px;
font-size: 12px;
margin: 0px;
top: 410px;
clip: rect(0px,auto,auto,auto);
position: absolute;
width: 400px;}
#foot {font-size: 12px;
color: #B5B1B1;
background-position: center;
left: 350px;
position: absolute;
margin-top: 530px;
text-align: center;}
#news_logo {left: 200px;
position: absolute;
top: 390px;
height: 101px;
width: 361px;
border-top-width: 3px;
border-right-width: 3px;
border-bottom-width: 3px;
border-left-width: 3px;
border-right-style: dashed;}