让两个或更多div并排显示
代码如下:我们用两种方法来让三个并排
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style>
body {margin:0px;}
.main {width:1003px;}
.a {float:left; width:200px; height:300px; background-color:#F8920D}
.b {float:left; width:30px; height:300px; background-color:#4096EE}
.c {float:left; width:773px; height:300px; background-color:#FF6600}
.d {width:1003px;}
.d ul{margin:0px; list-style-type:none;}
.d1 {float:left;width:200px; height:300px;background-color:#F8920D}
.d2 {float:left;width:30px; height:300px;background-color:#4096EE}
.d3 {float:left;width:773px; height:300px;background-color:#FF6600}
</style>
</head>
<body>
-+#方法1
<div class="main">
<div class="a"></div>
<div class="b"></div>
<div class="c"></div>
</div>
#方法2
<div class="d">
<ul>
<li class="d1"></li>
<li class="d2"></li>
<li class="d3"></li>
</ul>
</div>
</body>
</html>
