2012-09-27 78 views
1

enter image description here彼此相鄰並且一個在另一個之下

地方的div我想根據顯示的圖像以放置div。頂部那些已經完成但不能把底部的兩個我目前的樣式表如下:

#container { 
    position: relative; 
    height: 400px; 
    width: 100%; 
    min-width: 400px; 
    margin: 0 auto; 


} 
#left, #right { 
    position: absolute; 
    bottom: 201px; 
} 
#left { 
    left: 0; 
    width: 484px; 
    height: 195px; 


} 
#right { 
    right: 0; 
    width: 508px; 
    height: 196px; 


} 

還有一件事我的容器包含了所有的div

有人請幫助

回答

1

東西類似於 - JSFiddle

HTML:

<div class="row"> 
    <div class="col1">One</div> 
    <div class="col2">two</div> 
</div> 
<div class="row"> 
    <div class="col1">One</div> 
    <div class="col2">two</div> 
</div> 

CSS:

.row{ overflow: hidden; margin: 4px; } 
.col1, .col2{ float: left; width: 250px; height: 100px; } 
.col1{ background: red; } 
.col2{ background: green; }