Please Help! Center the Menu options on the Nav. Bar

Community Forums Forums Design Tips and Tricks Please Help! Center the Menu options on the Nav. Bar

This topic is: not resolved

This topic contains 5 replies, has 3 voices, and was last updated by  John 4 months, 3 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #5126

    CourtneyTU
    Participant

    I feel like i’m searching for a needle in a haystack…can someone please point me to the css code where I would be able to place the menu items on my navigation bar in the CENTER instead of the left?

    Courtneydevon.com

     

    Thanks!

    #5134

    John
    Participant
    Post count: 36

    Courtney,

    Adding this to your style.css should do the trick:

    .menu-primary {
    text-align: center;
    }
    .menu-primary li {
    display: inline-block;
    float: none;
    }

    John


    John Sundberg | blackhillswebworks.com
    A WordPress developer’s toolbox: Firebug | WordPress Codex | Google ;)

    #13676

    PhilMurray
    Participant
    Post count: 13

    hi John

    sorry i tried adding your code to the stylesheet but didn’t seem to work – any ideas?

    demo site is here

    thanks

     

    Phil

    #13689

    John
    Participant
    Post count: 36

    Hi Phil,

    In line 310 of your style.css change the float:left to this:

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

    Or just add it to the end of your style.css file.

    John


    John Sundberg | blackhillswebworks.com
    A WordPress developer’s toolbox: Firebug | WordPress Codex | Google ;)

    #13694

    PhilMurray
    Participant
    Post count: 13

    brilliant John – worked a treat!

    thanks again

    Phil

    #13717

    John
    Participant
    Post count: 36

    You’re welcome!


    John Sundberg | blackhillswebworks.com
    A WordPress developer’s toolbox: Firebug | WordPress Codex | Google ;)

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

You must be logged in to reply to this topic.