WordPress.org

Forums

Ward
[resolved] Center menu (7 posts)

  1. dswalker
    Member
    Posted 1 year ago #

    For the life of me I can't figure out how to center the menu (navbar) in this theme. Any ideas on where in the CSS I need to make the change to have the menu centered on all pages?

  2. BabyFaceWeb
    Member
    Posted 1 year ago #

    Hi DS,
    do you want to also center the theme title and subtitle along with the navigation items?

    Can you please provide the url of your site, so I can see it live?

    Best!
    Steve

  3. dswalker
    Member
    Posted 1 year ago #

    I've taken the title off and I'm using the Jumbo as the title of the page. I just need the navbar centered. It just feels off to me. Here is a link (of course the site isn't close to finished)

  4. BabyFaceWeb
    Member
    Posted 1 year ago #

    Hi Ds,
    thanks, that's made it easy.

    Here's your solution:

    .navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form {
    border-color: #101010;
    max-width: 650px;
    margin: 0 auto;
    }

    Hint: The reason it was tricky is that the responsive design has set the normal width of the navbar to "auto" which causes it to "fill" the rest of the width of the container. Setting the max-width attribute prevents this from happening and allows the margin attribute to be set to "auto" on the horizontal, while still giving a maximum value of the width of the object being centered.

    Feel free to ask for any more help ;-)

    Best!
    Steve

  5. dswalker
    Member
    Posted 12 months ago #

    Thanks, perfect!

  6. Joao Cerbino
    Member
    Posted 11 months ago #

    dswalker

    can you tell me how did you change the menu top bar color?? you changed the red to blue, I cant find this part on the style.css

    thank you

  7. supermikeydee
    Member
    Posted 11 months ago #

    I've added the above code to my page- and I'm not getting a centered navbar.
    .navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form {
    max-width: 650px;
    margin: 0 auto;
    }
    http://wwww.mikeandartdesign.com/

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.