<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
#pagebody {
width:800px;
height:500px;
background:#CEDA00 no-repeat;
}
#sidebar {
width:200px; /*设定宽度*/
text-align:left; /*文字左对齐*/
float:left; /*浮动居左*/
clear:left; /*不允许左侧存在浮动*/
overflow:hidden; /*超出宽度部分隐藏*/
background:#FF6600;
height:400px;
margin:0 auto;
}
#mainbody {
width:600px;
text-align:left;
float:right; /*浮动居右*/
clear:right; /*不允许右侧存在浮动*/
overflow:hidden;
background:#FFCC00;
height:400px;
margin:0 auto;
}
#main2{
width:89%;
background:#FF6600;
height:400px;
}
#left2{
width:200px;
float:left;
background:#CEDA00;
height:200px;
}
#rigth2{
margin-left:200px;
width:100
float:right;
background:#086677;
}
</style>
<link href="css.css" rel="stylesheet" type="text/css" media="all" />
</head>
<body>
<div id="pagebody">
<div id="sidebar">侧边栏</div>
<div id="mainbody">主体内容</div>
</div>
<div id="main2">
<div id="left2">左侧
</div>
<div id="rigth2">右边</div>
</div>
</body>
</html>