Closed Bug 285871 Opened 15 years ago Closed 11 years ago
margin:auto on the root element doesn't work (vertical centering)
Testcase coming up showing the problem. If is of any use, Opera does support this correctly. (There is a very small chance that this has some relation to bug 243519.)
It looks like it centers horizontally without a problem, but fails on the vertical centering.
To make it more clear. The problem is the vertical centering of the root element. We support this correctly for non-root elements.
Summary: margin:auto on the root element doesn't work → margin:auto on the root element doesn't work (vertical centering)
Bug 286556 has another testcase. Note that I'm not even sure if it's a bug for absolute positioning, but it's definitely a bug for fixed positioning. It's worth reading the next CSS2.1 draft closely to figure that out.
"User agents may treat position as 'static' on the root element." We take advantage of that, so the testcase doesn't work (the computed value of 'position' in Firefox is 'static'. Invalid? (Or do we want to support absolute positioning of the root element?)
The computed value of "position" on the <html> in that testcase is "absolute" over here....
Ah, you're right; oops. I guess I didn't look carefully enough.
Fixed by checkin for bug 243519.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.