html小白一个。遇到的代码想将它居中,然后尝试了align="center"和
都没有效果。代码精简后是这样的: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>待居中</title>
<style type="text/css">
.导航栏 {
position: absolute;
width: 1260px;
top: 61px;
height: 33px;
left: 12px;
font-size: 24px;
background-color: #128BDA;
color: #FFF;
font-family: "Arial Black", Gadget, sans-serif;
font-weight: bold;
z-index: 100;
}
.gywm {
position: absolute;
left: 12px;
top: 800px;
width: 474px;
height: 93px;
}
.hzzd {
position: absolute;
left: 529px;
top: 800px;
width: 764px;
height: 121px;
}
.
body {
background-image: url();
align="center";
}
.back {
position: absolute;
left: 10;
top: 0px;
z-index: 0;
}
</style>
</head>
<body>
<div>
<div class="back"><img src="images/back.jpg" width="1280" height="909" border="0" align="absmiddle" /></div>
<div class="hzzd">
<p>合作站点</p>
</div>
<div class="gywm">
<h4>关于我们</h4>
</div>
<p align="left"> </p>
<p align="left"> </p>
<div class="导航栏"><strong>首页</strong></div>
<div class="导航栏">
<table width="1260" border="0" align="center">
<tr>
<td width="115" scope="row"><a href="index.php" target="_blank"style="color:#FFFBF0">首页</a></td>
<td width="209">1</td>
<td width="189">2</td> </tr>
</body>
</html>