Forums

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

Home Forums CSS CSS position absolute help Re: CSS position absolute help

#105784
HoughtonA
Participant

Some options:

Set it to position:static; margin: * auto; text-align:center; //thanks scott! :P

You’re correct about the “anchor point.” It’s set at the top left of the object (assuming both top/bottom and left/right are set).
If the menu is of a fixed width you can do this: https://css-tricks.com/snippets/css/exactly-center-an-imagediv-horizontally-and-vertically/

If you’re looking for something a little more dynamic: http://www.brunildo.org/test/img_center.html might be a good resource.