WordPress.org

Ready to get started?Download WordPress

Forums

How do I center the Menu (6 posts)

  1. Randyd
    Member
    Posted 9 years ago #

    I am using a centered layout. I know how to position the menu left and right but I want to make the menu appear xxx pixels to the right of the center of the page. That way no matter what browser and screen size they are using, the menu will always appear xxx to the right of the page center.
    Can anyone help me?
    Thanks

  2. serendipity
    Member
    Posted 9 years ago #

    Yes... You can use position: absolute; left: 50%; . And then set the left margin to xxx px. If I've correctly understood you. If not, you might have to set a negative margin. Your menu must have a fixed width defined in px fot this to work. See this css tip on centering.

  3. Root
    Member
    Posted 9 years ago #

    Tha'ts horizontal centering. Just my 2c.

  4. Randyd
    Member
    Posted 9 years ago #

    Thanks, I'll try it.

  5. Randyd
    Member
    Posted 9 years ago #

    Yep, Your right. Thanks

  6. serendipity
    Member
    Posted 9 years ago #

    Well, I said I didn't seem to understand what you meant. In any case, you can add vertical centering with position:absolute as well. But I really don't know what 'the menu x px right of the center' means. Which reference point of the menu, and the center of what?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.