您现在的位置: 365建站网 > 365文章 > CSS中最基本的外框架

CSS中最基本的外框架

文章来源:365jz.com     点击数:135    更新时间:2009-05-17 23:06   参与评论
以下为引用的内容:
<!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>
<title>css基本布局方法</title>
<style type="text/css">
*
{
font-size:12px;
font-family:verdana;
margin:0px;/*--定义元素周围的空间*/
padding:0px;/*--定义元素边框与元素内容之间的空白*/
}
#body
{
position:relative;
width:85%;
margin:3px auto;/*上下,左右,这里的左右就是居中*/
height:100%;
}
#sidebar /*左边*/
{
position:absolute;
left:0;
top:0;
width:200px;
}
#right
{
width:240px;
position:absolute;
right:0;
top:0;
}
#center
{
margin:0 241px 0 201px;/*上右下左*/
}
#header,#footer
{
width:85%;
margin:0 auto;/*由浏览器设置*/
height:50px;
}
#sidebar,#right,#center,#header,#footer{border:solid 1px #000;}
#sidebar,#right,#center{height:780px;}
</style>
</head>
<body>
<div id="header">head</div>
<div id="body">
<div id="sidebar">left<br />left<br /></div>
<div id="center">center</div>
<div id="right">right</div>
</div>
<div id="footer">footer</div>
</body>
</html>

如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛

发表评论 (135人查看0条评论)
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
昵称:
最新评论
------分隔线----------------------------

快速入口

· 365软件
· 杰创官网
· 建站工具
· 网站大全

其它栏目

· 建站教程
· 365学习

业务咨询

· 技术支持
· 服务时间:9:00-18:00
365建站网二维码

Powered by 365建站网 RSS地图 HTML地图

copyright © 2013-2024 版权所有 鄂ICP备17013400号