我無法在#center1正下方放置#center3。我已經嘗試了漂移,它沒有工作,我也嘗試使用相對定位,但它也不工作。如何使用css將center1直接放置在center3下方
我一直在互聯網上尋找這個主題的幫助,現在沒有任何運氣。我也花了一些時間來看看我能否自己搞清楚,但對我來說太困難了。
HTML
<section>
<article></article>
<aside></aside>
<aside id="center1"></aside>
<aside id="center2"></aside>
<aside id="center3"></aside>
</section>
CSS
section {
margin:0px auto;
width:960px;
}
article {
width:960px;t turned out to be
height:100px;
border:1px solid #333;
}
aside {
width:250px;
height:1000px;
border:1px solid #333;
margin-top:5px;
margin-right:5px;
float:left;
}
#center1 {
width:200px;
height:300px;
border:1px solid #333;
margin-top:5px;
float:left;
}
#center2 {
width:200px;
height:300px;
border:1px solid #333;
margin-top:5px;
float:left;
}
#center3 {
width:200px;
height:300px;
border:1px solid #333;
margin-top:5px;
float:left;
}
如果您發佈HTML,我們也可能作出小提琴證明/如果你想#中心1解決的問題 – mattytommo 2013-03-13 12:41:13
#center2在另一行,然後#center3在另一行,我建議創建一個名爲clear的類,並將'.clear {clear:both;}'放在#center2之後和#center3之前 – 2013-03-13 12:43:04
@mattytommo HTML在那裏,它在代碼的底部:) – 2013-03-13 12:43:38