CSS 레이아웃에서 끈끈한 바닥 글을 설정하는 데 어려움이 있습니다. 나는 http://www.cssstickyfooter.com/에서 아이디어를 얻으려고했지만 div의 내용이 충분히 높지 않은 경우에는 페이지 하단에 바닥 글이 남지 않습니다.CSS 바닥 글이 페이지 하단에 붙지 않습니다.
CSS 파일 :
* {
margin:0;
padding:0;
}
body {
height:100%;
margin:0px;
padding:0px;
}
#wrap {
min-height: 100%;
}
#container {
overflow:auto;
padding-bottom: 150px;
text-align:left;
width:800px;
margin:auto;
}
#header {
height:240px;
margin-top:20px;
}
#navigation {
float:left;
width:800px;
margin-top:20px;
}
#content-container {
float:left;
width: 800px;
}
#left {
clear:left;
float:left:
width:480px;
height: auto;
margin: 20px 0px 20px 0px;
padding: 20px 10px 20px 10px;
}
#right {
float:right;
width:275px;
height:auto;
margin: 20px 0px 20px 0px;
padding: 20px 10px 20px 10px;
}
#footer {
position: relative;
clear:both;
height:150px;
margin-top: -150px;
}
#columns {
width:800px;
height:150px;
margin:auto;
}
#colleft {
float:left;
width:400px;
height:150px;
}
#colright {
float:right;
position:relative;
width:260px;
height:150px;
}
HTML 파일 :
<div id="wrap">
<div id="container">
<div id="header"></div>
<div id="navigation">
<div id="lang"></div>
</div>
<div id="content-container">
<div id="left"></div>
<div id="right"></div>
</div>
</div>
<div id="footer">
<div id="columns">
<div id="colleft"></div>
<div id="colright"></div>
</div>
</div>
관련이 없지만'# left'에는 세미 콜론 대신 콜론이있는'float : left :'가 있습니다. – Ryan
여기 다양한 div의 색상이있는 바이올린이있어 연주하기가 더 쉽습니다. http://jsfiddle.net/eQCVC/ 나는'float : left :'를'float : left;'로 변경했다. – Ryan