Help with centering menu

Community Forums Forums Design Tips and Tricks Help with centering menu

This topic is: not resolved

This topic contains 9 replies, has 2 voices, and was last updated by  genwrock 6 months, 1 week ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #85564

    wp guy
    Participant
    Post count: 220

    I’ve tried what I thought would work to center the menu, but it doesn’t. I’d appreciate any help:

    • This topic was modified 6 months, 2 weeks ago by  wp guy.
    • This topic was modified 6 months, 2 weeks ago by  wp guy.
    http://ashley.ethemedhosting.com/
    #85864

    wp guy
    Participant
    Post count: 220

    Bump – any help with this?

    #85868

    genwrock
    Member
    Post count: 322

    Replace in css file. line no 277

    .menu-primary li, .menu-secondary li, .site-header .menu li {
        float: left;
        list-style-type: none;
    }

    with

     .menu-secondary li, .site-header .menu li {
        float: left;
        list-style-type: none;
    }

    Next Add this new code

    .menu-primary li{
      display: inline-block;
      list-style-type: none;
    }

    Working as a freelancer & helping the people on forum | Chinmoy @ PWD | Please Follow Me on Twitter If I’ve helped.

    #85869

    wp guy
    Participant
    Post count: 220

    Thank you, but when I put in those changes it still did not center the menu.

    #85874

    genwrock
    Member
    Post count: 322

    are you sure that you added my code in style.css file of your child theme?


    Working as a freelancer & helping the people on forum | Chinmoy @ PWD | Please Follow Me on Twitter If I’ve helped.

    #85878

    wp guy
    Participant
    Post count: 220

    I’m pretty sure. I made the changes in firebug to see if it would work and it did not. Below is the entire code after I made your changes:

    /* Header / Primary / Secondary Navigation
    ———————————————————— */
    .menu-primary,
    .menu-secondary,
    .site-header .menu {
    background-color: #ebe5dc;
    clear: both;
    color: #737068;
    font-size: 14px;
    margin: 0 auto;
    overflow: hidden;
    width: 100%;
    }

    .menu-secondary {
    background-image: url(images/bg-footer-widgets-bot.png) bottom;
    border-top: 1px dashed #fff;
    }

    .site-header .menu {
    float: right;
    margin: 0;
    width: auto;
    }

    .menu-primary ul,
    .menu-secondary ul,
    .site-header .menu ul {
    float: left;
    width: 100%;
    }

    .menu-secondary li, .site-header .menu li {
    float: left;
    list-style-type: none;
    }

    .menu-primary li{
    display: inline-block;
    list-style-type: none;
    }

    • This reply was modified 6 months, 1 week ago by  wp guy.
    • This reply was modified 6 months, 1 week ago by  wp guy.
    #85879

    genwrock
    Member
    Post count: 322

    .menu-primary li, .menu-secondary li, .site-header .menu li {
    float: left;
    list-style-type: none;
    }

    Still I am getting the above code. You will remove it from 277 line and add my code. It will work


    Working as a freelancer & helping the people on forum | Chinmoy @ PWD | Please Follow Me on Twitter If I’ve helped.

    #85882

    genwrock
    Member
    Post count: 322

    also add this code .menu-primary{text-align: center;}


    Working as a freelancer & helping the people on forum | Chinmoy @ PWD | Please Follow Me on Twitter If I’ve helped.

    #85884

    wp guy
    Participant
    Post count: 220

    Perfect! That last piece of code did that trick. Thank you.

    #85886

    genwrock
    Member
    Post count: 322

    Yes. I forgot to add it first time :). We are also welcome.


    Working as a freelancer & helping the people on forum | Chinmoy @ PWD | Please Follow Me on Twitter If I’ve helped.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.