设置总的div
为什么我设置了一个总的div all第二个的位置就发生了变化我的margin和padding都是0还有空隙
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<style type>
#all{
margin:0;
padding:0;
}
#div1{
width:200px;
height:500px;
position:absolute;
left:0;
top:0;
background-color:#00F;}
#div2{
height:500px;
margin: 0 300px 0 200px;
background-color:#900;
}
#div3{
width:300px;
height:500px;
position:absolute;
right:0;
top:0;
background-color:#FC9;
}
</style>
</head>
<body>
<div id="all">
<div id="div1"></div>
<div id="div2"></div>
<div id="div3"></div>
</div>
</body>
</html>