div+css左中右布局示例
2014-04-01 20:31:32   来源:   评论:0 点击:

<!DOCTYPE html PUBLIC "- W3C DTD XHTML 1 0 Transitional EN" "http: www w3 org TR xhtml1 DTD xhtml1-transitional dtd"><h
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style>
#head{margin:5px auto;border:1px solid;background:red;width:98%;height:100px;}
#left{border:0px solid;background:blue;width:11%;height:400px;float:left;}
#center{border:0px solid;background:blue;width:78%;height:400px;float:left;margin:0px 5px 0px 5px;}
#right{border:0px solid;background:blue;width:11%;height:400px;float:left;}
#foot{margin:5px auto;border:1px solid;background:red;width:98%;height:50px;}
#main{margin:5px auto;border:0px solid black;width:98%;height:400px;}
</style>
</head>
<body>
<div id="head">head</div>
<div id="main">
<div id="left">left</div>
<div id="center">center</div>
<div id="right">right</div>
</div>
<div id="foot">head</div>
</body>
</html> 

相关热词搜索:div+css

上一篇:HTML字体颜色的设置及常用颜色的RGB值
下一篇:为什么要在css或者js文件后面加问号带参数