<style>
#left {
width:100px; background-color:blue;
height:100px; float:left;
}
#right {
width:50px; background-color:yellow;
height:100px;
float:right;
}
#main {
background-color:red; height:100%;
}
</style>
<div style="width:100%">
<div id="left">left </div>
<div id="right">right</div>
<!--main要写到最后一个-->
<div id="main">mian</div>
</div>
#left {
width:100px; background-color:blue;
height:100px; float:left;
}
#right {
width:50px; background-color:yellow;
height:100px;
float:right;
}
#main {
background-color:red; height:100%;
}
</style>
<div style="width:100%">
<div id="left">left </div>
<div id="right">right</div>
<!--main要写到最后一个-->
<div id="main">mian</div>
</div>