<![CDATA[
<body>
<div id="id1">
</div>
<div id="id2">
</div>
</body>
]]>
方法一:浮动实现
#id1 {
background-color: #000;
width:100px;
float:left;
height:200px;
}
#id2 {
background-color: #0f0;
height:200px;
}
方法二:绝对定位实现
#id1 {
background-color: #000;
width:100px;
position:absolute;
left:0px;
height:200px;
}
#id2 {
background-color: #0f0;
height:200px;
margin-left:100px;
}