私のウェブサイトは今見栄えがします。iPhone を除いて、縦にすると、コンテンツとフッターの間に大きな醜い空白ができます。フッターは常にコンテンツのすぐ下に配置したいのですが、同時にどこでも適切な外観を維持したいと考えています。フッターをそのコンテンツまで自動的に拡大し、フッターと同じ色でページの残りの部分を埋めるにはどうすればよいですか?
これが私のコードです:
/********************
Page Base
********************/
html, body {
height: 100%;
width: 100%;
overflow-x: hidden;
margin:0;
padding:0;
font-family: Tahoma, Geneva, sans-serif;
font-size: 12px;
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
}
img, a {
border:none;
outline: none;
}
#wrapper{
min-height:100%;
max-height:950px;
position:relative;
}
#header {
width: 100%;
height:145px;
background-color: #fff;
position: relative;
}
#shadow {
width: 1920px;
height:145px;
background-image:url(images/h_shadow.png);
position: relative;
z-index:-1;
margin-top:-98px;
}
#content {
height:auto;
position:relative;
padding:770px;
padding-bottom:35px;
width:100%;
display:none;
z-index:-2;
}
.contentbox{
width:3000px;
height:100%;
margin-top:-770px;
padding:0;
right:0;
left:0;
background:fff;
position:absolute;
z-index:-1;
margin-left:2000px;
}
#footer {
width:100%;
height:72px;
position:absolute;
bottom:0;
left:0;
background:#222;
margin:0;
padding:0;
}
.clear {
clear:both;
}