日期:2014-05-17 浏览次数:20709 次
css code:
<style type="text/css">
<!--
html,body,h1,h2,h3,h4,h5,h6,ul,ol,li,p{
margin:0;
padding:0
}
body{
font: 400 12px/18px "Lucida Sans Unicode", "Lucida Grande", sans-serif;
color:#666;
}
#layout{
background:#F3F5F9;
}
#l_block{
background:#ccc;
width:300px;
height:200px;
float:left;
}
#r_block{
background:#f00;
width:100px;
height:100px;
float:right;
}
.c_f{
clear:both;
}
-->
</style>
html code:
<div id="layout">
<div id="l_block">left block content</div>
<div id="r_block">right block content</div>
<div class="c_f">This is a content area</div> <!--clear float-->
</div>
css code:
<style type="text/css">
<!--
html,body,h1,h2,h3,h4,h5,h6,ul,ol,li,p{
margin:0;
padding:0
}
body{
font: 400 12px/18px "Lucida Sans Unicode", "Lucida Grande", sans-serif;
color:#666;
}
#layout{
overflow:auto;
zoom:1; /*ie6*/
background:#F3F5F9;
}
#l_block{
background:#ccc;
width:300px;
height:200px;
float:left;
}
#r_block{
background:#f00;
width:100px;
height:100px;
float:right;
}
-->
</style>
html code:
<div id="layout">
<div id="l_block">left block content</div>
<div id="r_block">right block content</div>
</div>
css code:
<style type="text/css">
<!--
html,body,h1,h2,h3,h4,h5,h6,ul,ol,li,p{
margin:0;
padding:0
}
body{
font: 400 12px/18px "Lucida Sans Unicode", "Lucida Grande", sans-serif;
color:#666;
}
#layout{
background:#F3F5F9;
}
#layout:after{
height:0;
display:block;
clear:both;
content:"";
visibility:hidden;
}
#l_block{
background:#ccc;
width:300px;
height:200px;
float:left;
}
#r_block{
background:#f00;
width:100px;
height:100px;
float:right;
}
-->
</style>
html code:
<div id="layout">
<div id="l_block">left block content</div>
<div id="r_block">right block content</div>
</div>