Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS help with css Re: help with css

#143473
Kitty Giraudel
Participant

To put it simple, `margin: 0 auto` have no effect on absolute/fixed elements. To center such an element, you can do this:

.element {
width: 800px;
position: fixed;
left: 50%;
margin-left: -400px; // minus half the width
}