WordPress.org

Ready to get started?Download WordPress

Forums

Fitting a menu to the width of the container. (6 posts)

  1. Creatrix
    Member
    Posted 1 year ago #

    Can anyone tell me how i fit my pink navigation menu to the width of the page?
    I'm struggling.....

    Site's here

    Thanks!

  2. Creatrix
    Member
    Posted 1 year ago #

    sorry its not pink, its the beige one across the top.
    my bad.

  3. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Ha - I was wondering about that! There may not be an easy, automatic way to do that -- you'll probably have to adjust the CSS if you add more menu items. Do you have custom CSS or a Child Theme set up?

  4. Creatrix
    Member
    Posted 1 year ago #

    Yes i'm using custom css - i've been playing with it and i know it has something to do with margin: 0 auto; but just can't figure which div to apply it to.

  5. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    I'm a bit confused about your theme - the link to the stylesheet says twentytwelve - but in the style.css file, it says it's custom? (Just checking because if twentytwelve has been modified directly, all the changes will be lost when WP is updated.)

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Changing the text-align here seems to center the menu:

    .main-navigation ul.nav-menu, .main-navigation div.nav-menu > ul {
        display: inline-block !important;
        text-align: left;
        width: 100%;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic