<!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
}
.main{width:800px;margin:0 auto;background-color:#00C;}
.left{
width:220px;
height:500px;
float:left;
background:#ccc;
}
.right{
width:580px;
height:200px;
float:right;
background:#ddd;
}
</style>
</head>
<body>
<div class="main">
<div class="left"></div>
<div class="right"></div>
</div>
</body>
</html>
-----------------------------------------------------
这里main里的2个class是有高度的,main只有宽度没有高度,那main的高度在没有设置的情况下,是不是默认100%呢?还是有其他的说法