星空网 > 软件开发 > Java

一个自适应的宽度的两列网页布局

<!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=utf-8" />
<title>绝对定位:一栏固定,一栏自适应</title>
<style type="text/css">
<!--
* {
margin:0;
padding:0;
}
body {
background:#fff;
font:12px normal Arial #444;
line-height:18px;
text-align:center;
}
#box {
width:100%;
height:500px;
margin:0 auto;
background:#f2f2f2;
}
.header {
width:100%;
height:30px;
background:#39c;
}
.right {
width:240px;
height:400px;
background:#fff;
position:absolute;
right:20px;
top:50px;
}
.left {
margin-right:280px;
margin-top:20px;
background:#fff;
margin-left:40PX;
height:400px;
}
.content {
width:96%;
height:300px;
margin:0 auto;
background:#444;
}
.footer {
width:100%;
height:100px;
background:#f2f2f2;
}
p {
padding:10px 10px;
font-size:16px;
font-weight:bold;
color:#39C;
line-height:22px;
}
//
-->
</style>
</head>
<body>
<div id="box">
<div ><span >头部自适Div</span></div>
<div >
<p>左则自适应缩放</p>
<div >
<p>内容区块,相对父元素按百分比适应</p>
</div>
</div>
<div >
<p>绝对固宽定位的右侧栏>
</div>
<div >
<p>底部自适应</p>
</div>
</div>
<div>http://www.999jiujiu.com/</div>
</body>
</html>




原标题:一个自适应的宽度的两列网页布局

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流