上面的教程中三列布局的时候为什么不能设置整体宽度,比如说我想设计整体宽度为800px并居中显示,为什么不能实现呢?
<!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">
body{ margin:0; padding:0; font-size:30px; font-weight:bold}
div{ text-align:center; line-height:50px}
.kuandu{width:800px; margin:0 auto}
.left{ width:300px; height:600px; background:#ccc; position:absolute; left:0; top:0}/*左浮动样式*/
.middle{background-color:#606; height:600px; margin:0 300px 0 300px}
.right{ width:300px; height:600px; background:#FCC; position:absolute; right:0; top:0}/*右浮动样式*/
</style>
</head>
<body>
<div class="kuandu">
<div class="left">left</div>
<div class="middle">中间的内容部分自适应</div>
<div class="right">right</div>
</div>
</body>
</html>