콘텐츠가있는 컨테이너 div가 있습니다.이 콘텐츠는 때때로 class="top"
및 class="bottom"
으로 나눌 필요가 있습니다. 분명히 아무 float:top
또는 float:bottom
, 그래서 html/css 혼자서 이것을 달성하는 가장 좋은 방법은 무엇입니까?div를 포함하는 div의 위와 아래에 위치 divs
예 :
<div class="content">
<div class="left">
<a href="#"><img src="img/home.jpg" alt="salon home"></a>
</div><!-- end left -->
<div class="center">
<a href="#" class="top"><img src="img/about.jpg" alt="about salon"></a>
<a href="#" class="bottom"><img src="img/services.jpg" alt="salon service"></a>
</div><!-- end center -->
<div class="right">
<a href="#" class="top"><img src="img/products.jpg" alt="salon products"></a>
<a href="#" class="bottom"><img src="img/contact.jpg" alt="contact salon"></a>
</div><!-- end right -->
</div><!-- end content -->
#container .content {
margin-top: 115px;
}
#container .content .left {
float: left;
width: 307px;
}
#container .content .center {
float: left;
padding-left: 19px;
width: 307px;
}
#container .content .right {
float: right;
width: 307px;
}
ETA - 뿐인 - 당신은 몇 가지 간단한 단계를 수행 할 수 있습니다 http://jsfiddle.net/FaTxw/2/
절대 위치 :
는 작업 예제를 참조하십시오? – j08691@ j08691 이는'float : right'과'float : left'을 사용하지 않을 것입니다, 안돼요? – AMC
당신은''을 맨위로,'''을 맨 아래로 강제하려고합니까? 귀하의 질문에서 원하는 정확한 결과를 결정하는 것은 매우 어렵습니다. – Axel