Paul A. Johnson
Paul A. Johnson

Reputation: 1

Trouble centering navigation in wordpress CSS

I cannot for the life of me figure out how to center the navigation here:

www.cmee.org

I have tried the adding the "text-align: center;" attribute in the editor, but I have to admit that CSS isn't my thing. Might anyone be able to suggest how I can go about fixing this incredibly frustrating issue?

I'm incredibly grateful for any assistance that can be offered.

Upvotes: 0

Views: 22

Answers (2)

Tarun Mahashwari
Tarun Mahashwari

Reputation: 358

Add following lines at the bottom of your theme style.css file:

#subnav .wrap, #nav .wrap {
    text-align: center;
}
#subnav ul, #nav ul {
    display: inline-block;
    padding: 0px;
}
#subnav li, #nav li {
    float: none;
    display: inline-block;
}

i have tested it and you can see the result here:

enter image description here

Upvotes: 1

Nicholas
Nicholas

Reputation: 1229

Did you try to use margin:auto ? give your menu for example id topmenu and make it something like

#topmenu{
 margin:auto;
}

maybe also post the css for your menu if this doesnt help

Upvotes: 0

Related Questions