-1
我想將容器中div的所有內容居中。 我試圖使用保證金0汽車,它沒有工作 我怎麼能中心呢?如何居中div
<div class="container">
<div class="text-center" style="margin:0 auto;overflow:auto;">
<div style="float:left;width:15%;margin-right:2px;">
<img src="PICTURES/Bruce-Crocker_311x312(2).jpg" class="img-responsive" />
<div class="contenthover">
<p>bla</p>
</div>
</div>
<div style="float:left;width:15%;margin-right:2px;">
<img src="PICTURES/Bruce-Crocker_311x312(2).jpg" class="img-responsive" />
<div class="contenthover">
<p>bla</p>
</div>
</div>
</div>
任何人都可以幫忙嗎?
謝謝你,只是如果你想添加,如果一個DIV它的好你用float添加更多的div:離開它不起作用。 – matishw 2014-10-08 23:13:05