我有幾個divs似乎在一圈,而不是小提琴,但希望homemidcontent div低於homebanner div?請幫忙。我該如何解決這個問題?如何防止div重疊?
小提琴:enter link description here
標記
<div id="homecontent-mid" class="row rounded">
<div id="homebanner" class="rounded">
<div class="sliderdiv">Slider Content</div>
<div class="main-search">Search Content Here</div>
</div>
<div id="homemidcontent" class="rounded">
<div id="home-mid-mid">Mid content here</div>
<div id="home-mid-right">Mid Content Right here</div>
</div>
</div>
CSS
#homecontent-mid {
background: url("images/bg-stage.png") repeat-y scroll right top #FFFFFF;
border: 1px solid #BDBCBD;
margin-top: 0;
min-height: 100%;
outline: medium none;
overflow: visible;
position: relative;
}
#homebanner {
background: url("images/bg-stage-shade.png") repeat-x scroll 0 0 transparent;
padding-right: 20px;
position: relative;
}
.sliderdiv {
background: white;
float: right;
}
.main-search {
background: none repeat scroll 0 0 #FFFFFF;
border: medium solid #D51386;
float: left;
overflow: hidden;
padding: 20px 10px;
border-radius: 10px;
}
#homemidcontent {
background: #fff;
padding-right: 20px;
position: relative;
}
#home-mid-mid {
background: yellow;
}
#home-mid-right {
background: pink;
}
哇這麼simple..thanks很多 – user2725936
我一直在尋找這個答案很長一段時間。這是一個非常簡單的解決方案。謝謝。 –