<!doctype html public "-//w3c//dtd html 4.01//en" "http://www.w3.org/tr/html4/strict.dtd">
<html>
<head>
<title>div标签左右排版,对其,body居中 -- kalision</title>
<style>
body{font-size:19px;align:center;}
.shang{background-color:green;color:#FFF;width:500px;height:100px;margin:0 auto;}
.zhong{background-color:yellow;width:500px;height:100px;margin:0 auto;}
.xia{background-color:red;color:#FFF;width:500px;height:100px;margin:0 auto;}
.zhongzuo{background-color:#DDD;width:33%;height:100%;margin:0 auto;float:left;}
.zhongzhong{background-color:#BAA;width:33%;height:100%;margin:0 auto;float:left;}
.zhongyou{background-color:#AEE;width:34%;height:100%;margin:0 auto;float:right;}
</style>
</head>
<body>
<div class="shang">上</div>
<div class="zhong">
<div class="zhongzuo">中左</div>
<div class="zhongzhong">中中</div>
<div class="zhongyou">中右</div>
</div>
<div class="xia">下</div>
</body>
</html>
<html>
<head>
<title>div标签左右排版,对其,body居中 -- kalision</title>
<style>
body{font-size:19px;align:center;}
.shang{background-color:green;color:#FFF;width:500px;height:100px;margin:0 auto;}
.zhong{background-color:yellow;width:500px;height:100px;margin:0 auto;}
.xia{background-color:red;color:#FFF;width:500px;height:100px;margin:0 auto;}
.zhongzuo{background-color:#DDD;width:33%;height:100%;margin:0 auto;float:left;}
.zhongzhong{background-color:#BAA;width:33%;height:100%;margin:0 auto;float:left;}
.zhongyou{background-color:#AEE;width:34%;height:100%;margin:0 auto;float:right;}
</style>
</head>
<body>
<div class="shang">上</div>
<div class="zhong">
<div class="zhongzuo">中左</div>
<div class="zhongzhong">中中</div>
<div class="zhongyou">中右</div>
</div>
<div class="xia">下</div>
</body>
</html>