CSS网页布局(页面设计左右固定中间动态1-3-1)

<!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=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#header,#content,#footer{
 height:50px;
 width:80%;
 background-color:#FF9999;
 margin:10px auto;
}
#content{
 height:500px;
}
#left{
 height:500px;
 width:100px;
 background-color:#FF0099;
 float:left;
}
#right{
 height:500px;
 width:100px;
 background-color:#FF0000
 float:right;
}
#center{
 height:500px;
 width:100%;
 float:left;
 margin-right:-200px;
}
#varcenter{
 height:500px;
 background-color:#FF9900;
 margin-right:200px;
}
</style>
</head>

<body>
<div id="header"></div>
<div id="content">
    <div id="left">我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟</div>
    <div id="center">
<div id="varcenter">小鸟飞呀飞我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟我是一只小小鸟</div>
</div>
    <div id="right"></div>
</div>
<div id="footer"></div>
</body>
</html>

posted @ 2011-11-04 10:03  威德尔海豹  阅读(347)  评论(0)    收藏  举报