2010-12-18 6 views
0

는 여기에 내가 일하고 있어요 사이트의 내용 아래에 앉아있다.100 % 신장 문제

이렇게하려면 래퍼 div를 100 % 최소 높이로 설정 한 다음 바닥 글에 해당 div의 하단에 앉아 있다고 생각했습니다. body, html 및 wrapper 태그에 min-height 클래스를 두어 보았지만 작동하지 않았습니다.

이 내 CSS입니다 : http://antidote.treethink.com/wp-content/themes/antidote-new/style.css

감사합니다, 웨이드

답변

1

당신은 고전적인 솔루션을 시도 할 수 있습니다 ...하지만 과거에 도움이되었습니다

<div id="header-content"> 
    <div id="header"> 
     bar 
    </div> 
    <div id="content"> 
     bar 
    </div> 
</div> 
<div id="footer"> 
    foo 
</div> 

main.css가

html, 
body { 
    height:100%; 
    } 
#header-content { 
    position:relative; 
    min-height:100%; 
    } 
#content { 
    padding-bottom:3em; 
} 
#footer { 
    position:relative; 
    height:3em; 
    margin:-3em 0 0; 
    } 

ie.css
* HTML #header-content { 
    height:100%; /* min-height for IE<7 */ 
    } 
+0

물론 #header는 선택 사항입니다. – Flack

0

이건 그냥 내 머리 위로 떨어져있다. 내 생각은 콘텐츠를 보유하고있는 컨테이너 div를 만듭니다. 바닥 글을 상대 위치 인 bottom: 0px;에 넣습니다.

<div id="content-container"> 
    <div id="page-content" style="position: relative;"><p>This holds my content</p></div> 
    <div id="footer" style="position: relative; bottom: 0px;"> 
     <p>Footer content in here</p> 
    </div> 
</div> 

나는

편집 사실 내 머리 위로 잘되지 않습니다 ... 그 일을한다고 생각합니다. 이 포스팅은 http://ryanfait.com/resources/footer-stick-to-bottom-of-page/

관련 문제