css三列布局问题:在一大框中 有三小框设置为float:left 为什么第三个小框不出来?
<!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>
*{
margin:0px;
padding:0px;
}
.uuu{
margin:auto;
width:600px;
background:#CCC;
}
.iii{
float:left;
width:190px;
height:100px;
background:red;
}
.rrr{
float:left;
width:190px;
height:100px;
background:green;
}
.777{
float:left;
width:190px;
height:100px;
background:red;
}
</style>
</head>
<body>
<div class="uuu">
<div class="iii">1</div>
<div class="rrr">2</div>
<div class="777">3</div>
</div>
</body>
</html>
这个代码应该是你想要的结果。首先.rrr里的 margin:0 200px;是不应该改设置的。你可以重新建一个HTML页面,把CSS样式和BODY里的内容复制过去看看效果。