您的位置:首页 > Web前端 > CSS

div+css排版的样例

2006-06-17 00:00 525 查看
div+css排版的样例










Div布局

body{text-align:center;margin:0;padding:0}
/*text-align:center是ie中必须要有的*/
div
{
height:200px;
color:red;
}
.title
{
margin:0 auto;
width:776px;
background-color:#abcdef;
}
.middle
{
margin:0 auto;
width:776px;
}
.left
{
float:left;
clear:right;
width:20%;
background-color:#eeefff;
}
.center
{
float:left;
clear:right;
width:50%;
background-color:#CCC000;
}
.right
{

float:left;
clear:right;
width:30%;
background-color:#fff000;
}
.both
{
clear:both;
width:100%;
background-color:#666999;
}
.footer
{
margin:0 auto;
width:776px;
clear:both;
background-color:#000fff;
}



顶部

左侧
中部
右侧
全行
左侧
中部
右侧
全行
左侧
中侧
右侧

底部

[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: