2011-06-07 60 views
0

今天,在使用FF4中的靈活盒子模型時,我注意到我無法使用margin: 0 auto;將文檔中心放在文檔中。如何在文檔中對齊彈性盒子?

有沒有人知道任何方式來居中這個容器?在Webkit中,它按預期工作。

+1

你應該表現出你的代碼的一個更完整的例子。顯示HTML和CSS。 – mrk 2011-06-07 05:23:15

回答

0

試試這個:

爲FF

display: -moz-box; 
-moz-box-orient: horizontal; 
-moz-box-pack: center; 
-moz-box-align: center; 

正常情況下

display: box; 
box-orient: horizontal; 
box-pack: center; 
box-align: center;