更改页脚的位置似乎对我有用:
#footer
{
position: absolute; /* This is the important bit */
margin-top: -81px; /* negative value of footer height */
margin-left: 10%;
margin-right: 10%;
height: 80px;
width: 75%;
clear:both;
text-align: center;
font-size: 48pt;
font-weight: bold;
background: url(bg-image.png) no-repeat #EBEBEB; /*non-CSS3 browsers will use this*/
background: url(bg-image.png) no-repeat, -webkit-gradient(linear, 0 0, 0 100%, from(#EEFF99) to(#66EE33)); /*old webkit*/
background: url(bg-image.png) no-repeat, -webkit-linear-gradient(#EEFF99, #66EE33); /*new webkit*/
background: url(bg-image.png) no-repeat, -moz-linear-gradient(#EEFF99, #66EE33); /*gecko*/
background: url(bg-image.png) no-repeat, -ms-linear-gradient(#EEFF99, #66EE33); /*IE10 preview*/
background: url(bg-image.png) no-repeat, -o-linear-gradient(#EEFF99, #66EE33); /*opera 11.10+*/
background: url(bg-image.png) no-repeat, linear-gradient(#EEFF99, #66EE33); /*future CSS3 browsers*/
-pie-background: url(bg-image.png) no-repeat, linear-gradient(#EEFF99, #66EE33); /*PIE*/
border-left: 1px solid black;
border-right: 1px solid black;
border-bottom: 0;
border-top: 1px solid black;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px 10px 0px 0px;
behavior: url('/js/lib/PIE-1.0.0/PIE.htc');
}
看这里:
http://fiddle.jshell.net/srwtC/3/show/
更新
#footer {
max-width: 1200px;
min-width: 700px;
position: absolute;
z-index: 2;
height: 50px;
left: 0; /*IMPORTANT*/
right: 0; /*IMPORTANT*/
margin: -51px auto 0;
border: 1px solid black;
border-bottom: 0;
background: #E1DAC6;
background: url(bg-image.png) no-repeat #EBEBEB;
-pie-background: url(bg-image.png) no-repeat, linear-gradient(#EEFF99, #66EE33);
border-left: 1px solid black;
border-right: 1px solid black;
border-top: 1px solid black;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px 10px 0px 0px;
behavior: url('/js/lib/PIE-1.0.0/PIE.htc');
}