있어 문제가 모두 후 큰 격차 ..CSS - div의 맑은
HTML
<div id="site-menu">menu1
<br>menu2
<br>menu3
<br>menu4
<br>menu5
<br>menu6
<br>
</div>
<div id="site-content">
<div class="site-content">
<div id="site-content-left">left</div>
<div id="site-content-right">right</div>
<div class="clear"></div>
</div>
</div>
CSS
.site-content {
background:pink;
}
#site-content {
background:red;
margin-left:250px;
}
#site-content-left {
background:orange;
float:left;
}
#site-content-right {
margin:5px 0 5px 0;
background:blue;
}
#site-menu {
float:left;
width: 250px;
padding: 20px 0;
overflow:hidden;
background:grey;
}
.clear {
clear:both
}
격차가 모두 명확 후 있습니다. 그 격차는 메뉴 div 높이 (메뉴 div가있는 것이 있습니다.)로 큽니다. 어떤 해결책을 주시겠습니까? 어떤 문서에 선행 요소 부유 이하
당신이 당신의 코드 일부 jsFiddle 페이지를 만들 것 같은 경우는 도움이 될 것입니다 : http://jsfiddle.net/6CCP8/ – Cherniv
바이올린 또는 빈은 [CSS는 많은 문제 –
가능한 중복 도움이 될 분명히 둘 다 - 큰 격차] (http://stackoverflow.com/questions/17761293/css-problems-with-clear-both-big-gap) –