Closed
Bug 285871
Opened 19 years ago
Closed 15 years ago
margin:auto on the root element doesn't work (vertical centering)
Categories
(Core :: Layout: Positioned, defect)
Core
Layout: Positioned
Tracking
()
RESOLVED
FIXED
People
(Reporter: annevk, Unassigned)
References
Details
(Keywords: css2, testcase)
Attachments
(1 file)
358 bytes,
application/xml
|
Details |
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.)
Reporter | ||
Comment 1•19 years ago
|
||
Comment 2•19 years ago
|
||
It looks like it centers horizontally without a problem, but fails on the vertical centering.
Reporter | ||
Comment 3•19 years ago
|
||
To make it more clear. The problem is the vertical centering of the root element. We support this correctly for non-root elements.
Reporter | ||
Updated•19 years ago
|
Summary: margin:auto on the root element doesn't work → margin:auto on the root element doesn't work (vertical centering)
Comment 4•19 years ago
|
||
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.
Comment 5•17 years ago
|
||
"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?)
![]() |
||
Comment 6•17 years ago
|
||
The computed value of "position" on the <html> in that testcase is "absolute" over here....
Comment 7•17 years ago
|
||
Ah, you're right; oops. I guess I didn't look carefully enough.
Fixed by checkin for bug 243519.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•