The absolute box is not centered by "margin: auto;"

VERIFIED INVALID

Status

()

VERIFIED INVALID
14 years ago
14 years ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

Trunk
mozilla1.8beta3
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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
Attachment #186806 - Flags: superreview?(dbaron)
Attachment #186806 - Flags: review?(dbaron)
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.
Attachment #186806 - Flags: superreview?(dbaron)
Attachment #186806 - Flags: superreview-
Attachment #186806 - Flags: review?(dbaron)
Attachment #186806 - Flags: review-
(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.
-> v.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.