CSS 2.1 10.3.7 said: > If none of the three is 'auto': If both 'margin-left' and 'margin-right' are 'auto', solve the equation under the extra constraint that the two margins get equal values, unless this would make them negative, in which case when direction of the containing block is 'ltr' ('rtl'), set 'margin-left' ('margin-right') to zero and solve for 'margin-right' ('margin-left'). If one of 'margin-left' or 'margin-right' is 'auto', solve the equation for that value. If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value. http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width But, following testcase is not centered by "margin: auto;". http://bugzilla.mozilla.gr.jp/attachment.cgi?id=2830&action=view
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.8beta3
(In reply to comment #0) > > If none of the three is 'auto' That's the wrong clause, since both 'left' and 'right' are 'auto'.
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → INVALID
Comment on attachment 186806 [details] [diff] [review] Patch rv1.0 The testcase here is displayed correctly, and this patch makes it incorrect.
(And we already have code to handle auto margins, and as far as I know that code is correct. There's definitely no need to add a second piece of code to do the same thing.)
(In reply to comment #2) > (In reply to comment #0) > > > If none of the three is 'auto' > > That's the wrong clause, since both 'left' and 'right' are 'auto'. Excuse me. I cannot understand well. Does "If none of the three is 'auto'" mean that the all three values are not 'auto'? I understood that it means 'left' or 'right' or 'width' is not 'auto'.
(In reply to comment #5) > Does "If none of the three is 'auto'" mean that the all three values are not 'auto'? Yes.
O.K. thanks, David.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.