下面是我做的一个示例(在IE6.0 / Opera9.00 / Mozilla Firfox 1.5 验证通过):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style>
.left
{
float:left;
80px;
height:80px;
margin-left:0px;/*浮动左边*/
}
#left1
{
background-color:#333;
}
#left2
{
background-color:#666;
}
#left3
{
background-color:#999;
}
#left4
{
background-color:#ccc;
}
</style>
</head>
<body>
<div id="left1" class="left">dd</div>
<div id="left2" class="left">2</div>
<div id="left3" class="left">3</div>
<div id="left4" class="left">5</div>
</body>
</html>