0
這是失敗的jsfiddle link。我想有buttonCenter位於黑盒子下面的圖片中格:Div定位 - Css
如何做我必須要改變的CSS類buttonCenter:
#buttonCenter {
width: 250px;
height: 100px;
margin-right:auto;
margin-left:auto;
margin-top:100px;
background-color:gray;
}
謝謝提前
正確的,良好的工作。 +1 – Ruddy
非常感謝,很好的回答! – anilca
@anilca您好,如果您希望擺脫不必要的浮動,請確保使用'clear:both;'清除它們,尤其是使用浮動元素的#buttonsContainer容器,請閱讀我的答案[here]( http://stackoverflow.com/questions/12871710/why-clear-both-css),知道爲什麼這是必要的 –