圣杯布局
<div id="hd">header</div>
<div id="bd">
<div id="middle">middle</div>
<div id="left">left</div>
<div id="right">right</div>
</div>
<div id="footer">footer</div>
<style>
#hd{
height:50px;
background: #666;
text-align: center;
}
#bd{
padding:0 200px 0 180px;
height:100px;
}
#middle{
float:left;
width:100%;
height:100px;
background:blue;
}
#left{
float:left;
width:180px;
height:100px;
margin-left:-100%;
background:#0c9;
position:relative;
left:-180px;
}
#right{
float:left;
width:200px;
height:100px;
margin-left:-200px;
background:#0c9;
position:relative;
right:-200px;
}
#footer{
height:50px;
background: #666;
text-align: center;
}
</style>
双飞翼布局
<div id="hd">header</div>
<div id="middle">
<div id="inside">middle</div>
</div>
<div id="left">left</div>
<div id="right">right</div>
<div id="footer">footer</div>
<style>
#hd{
height:50px;
background: #666;
text-align: center;
}
#footer{
clear:both;
height:50px;
background: #666;
text-align: center;
}
#middle{
float:left;
width:100%;
height:100px;
background:blue;
}
#left{
float:left;
width:180px;
height:100px;
margin-left:-100%;
background:#0c9;
}
#right{
float:left;
width:200px;
height:100px;
margin-left:-200px;
background:#0c9;
}
#inside{
margin:0 200px 0 180px;
height:100px;
}
</style>