... 그것은 권리를 쉽고 폭 왼쪽입니다CSS는 부동 바닥 글 여백
| ____ |
| | | |
| |____| |
| |
감사
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,
textarea,p,blockquote,th,td {
margin:0;
padding:0;
}
#header {
height: 33px;
line-height: 33px;
text-align: center;
background-color: green;
}
html { height: 100%; }
body { height: 100%; width: 90%; margin: auto; }
#wrap { min-height: 100%; background-color:gray; }
#main {
overflow: auto;
padding-bottom: 33px; /* must be same height as the footer */
background-color: red;
height: 100%;
}
#footer {
position: relative;
margin-top: -33px; /* negative value of footer height */
height: 33px;
line-height: 33px;
text-align: center;
background-color:blue;
}
을 90 % 높이를 얻을 수 (또는 상단 & 하단 여백의 어떤 종류를 표시) 부동 바닥 글을 엉망으로하지 않고합니다
html {높이 : 90 %; margin-top : 5 %; margin-bottom : 5 %; } 작동하지 않습니다!? 상단은 괜찮지 만 밑바닥이 틀어져 있습니다. –
http://jsfiddle.net/F9HBc/ _stretching_ div를 세로로 가운데 정렬하는 것이 왜 그렇게 어렵습니까? 그것은 horozontal resize 벌금 처리 (바보, 주어진 ... 또는 CSS) –
http://www.jsfiddle.net/CrdEy/ http://www.infinitywebdesign.com/research/cssverticalcentereddiv.htm을 기반으로 여전히 작동하지 않습니다 –