2013-02-13 4 views
0

내 웹 사이트가 멋지게 보입니다. iPhone을 제외하고는 똑바로 세운 상태에서 내 콘텐츠와 바닥 글 사이에 커다란 못생긴 공백이 있습니다. 꼬리말이 항상 콘텐츠 하단에 있어야하지만 동시에 모든 곳에서 올바른 모양을 유지해야합니다. 페이지의 나머지 부분을 채우기 위해 바닥 글과 같은 색상으로 콘텐츠를 자동으로 늘릴 수있는 방법은 무엇입니까?CSS에서 본문으로 바닥 글 높이 자동 맞춤?

여기 내 코드입니다 :

/******************** 
    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; 
} 

답변

0

당신의 HTML을 볼 좋은 것입니다,하지만 당신은 상대적으로 바닥 글을 배치하는 경우, 그것은 자동으로 바로 위에 어떤 아래, 맨 아래에 표시됩니다. body의 배경을 바닥 글의 같은 색상으로 설정할 수 있습니다.