Home › Forums › CSS › Flexbox doesn’t center with auto margin in Firefox › Re: Flexbox doesn’t center with auto margin in Firefox
April 9, 2013 at 7:06 pm
#131187
Member
If you actually want…
width: 80%;
margin: 0 auto;
…why not just use “margin :0 10%” for your centering? If you’re leaving exactly 20% of the containing-block width for use in margins, you can just assign 10% to either side and be done with it.
Here’s a fork of your codepen, with this added — it works for me in old version of Firefox: http://codepen.io/anon/pen/jLbeI
(See also https://bugzilla.mozilla.org/show_bug.cgi?id=701794 which covers the issue with auto margins and moz-box)