开发者

How to center a flexible box in the document?

开发者 https://www.devze.com 2023-03-11 22:40 出处:网络
Today, while working with flexible box model in FF4, I noticed that I can\'t center a container in the docu开发者_如何学JAVAment using margin: 0 auto;.

Today, while working with flexible box model in FF4, I noticed that I can't center a container in the docu开发者_如何学JAVAment using margin: 0 auto;.

Does anybody know any way of centering this container? In Webkit it works as expected.


Try this:

for FF

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

for normal case

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

精彩评论

暂无评论...
验证码 换一张
取 消