【发布时间】:2012-03-10 04:45:37
【问题描述】:
我需要一个简单的div 和header,footer and body content.
header 和 footer 需要是 fixed 并且 div 的 height 应该是 250px 或最大 500px 并且它的 width 是 500px
而我的 body content 应该是 fluid 以便它应该扩展内容。
Header 和 footer 必须是 40px.
而且我需要在页眉和页脚之后有一条水平线。
我已经完成了,但我无法设置它的页脚,因为我对对齐方式感到疯狂。
谁能给我建议:
CSS:
mainbody
{
position:absolute;
Left:35%;
top:20%;
display:none;
height:250px;
width:500px;
margin-top: 0;
border:1px solid #fff;
box-shadow:0px 2px 7px #292929;
-moz-box-shadow: 0px 2px 7px #292929;
-webkit-box-shadow: 0px 2px 7px #292929;
border-radius:10px;
-moz-border-radius:10px;
-webkit-border-radius:10px;
background-color:#ffffff;
z-index:50;
}
.header
{
height: 30px;
border-bottom: 1px solid #EEE;
background-color: #ffffff;
height: 40px;
width: 490px;
padding: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.footer
{
width:500px;
margin-bottom: 0;
margin-top: 37px;
margin-left:-5px;
background-color: whiteSmoke;
border-top: 1px solid #DDD;
-webkit-border-bottom-right-radius:5px;
-webkit-border-bottom-left-radius:5px;
-moz-border-radius-bottomright:5px;
-moz-border-radius-bottomleft:5px;
border-bottom-right-radius:5px;
border-bottom-left-radius:5px;
}
这是我需要的:
【问题讨论】:
-
@All-感谢你们的支持,你们让我以不同的方式思考每个人。
标签: html css header footer fluid-layout