我有这样的html结构:
<body>
<div class='header'>
</div>
<div class='wrapper'>
****
</div>
<div class='footer'>
</div>
</body>
和这样的CSS:
body, html{
background-color: #5669e1;
margin: 0;
padding: 0;
border: 0;
height: 100%;
}
.header {
position: relative;
z-index: 10010;
width:100%;
height: 226px;
background: url(../images/header.png) no-repeat center top;
}
.wrapper{
position: absolute;
width: 1200px;
min-height: 100%;
height: auto !important;
height: 100%;
display: table;
left: 50%;
margin: -100px 0 0 -600px;
z-index: 10000;
padding-bottom: 176px;
background-color: #fff;
-webkit-box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.75);
-moz-box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.75);
box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.75);
}
.footer{
height: 176px;
background: url(../images/footer.png) no-repeat center;
position: relative;
height: 176px;
margin-top: -176px;
}
但它是在标题之后,当我的包装器不是绝对的时,它在不同的页面上也显示得很奇怪。我怎样才能把它放在底部,在 176px 的包装器中?