Center text in custom menu for 2011 theme

  • Author
    Posts
  • #882257

    soulbearth
    Member

    Could someone please help me with code for centering text in the navigation menu for 2011 theme?

    The blog I need help with is navnihal.com.

    #882374

    When I click on your username this is what I get:

    isthatwhoiam.wordpress.com is no longer available.
    The authors have deleted this blog.

    We need a link to the site you are talking about please.

    #882375

    Working off the demo site, give this a try.

    .menu-top-navigation-container {
    text-align: center;
    }
    
    ul.menu {
    display: inline-block;
    }
    #882380

    soulbearth
    Member

    Sorry. The blog is navnihal.com

    I’ll give that first suggestion a try.

    #882381

    soulbearth
    Member

    That first suggestion didn’t seem to work.

    #882385

    You have to use both rules I gave above. It works on the demo site and it works on my test site set with 2011.

    #882387

    Well, now that is weird. It isn’t working on your site with Firebug. Let me play with it a little.

    #882395

    The code above does work. You have to include ALL of it, and put it at the end of your current CSS customizations.

    #882401

    Gaaaahhhhh!

    I’m sorry, I messed up on the first selector name. Use the following.

    .menu-menu-container {
        text-align: center;
    }
    
    ul.menu {
        display: inline-block;
    }
    #882414

    soulbearth
    Member

    I’m not sure if you can see all my CSS customizations. So, I posted them below. It still isn’t centering for me. Maybe it has to do with the code already in there about deleting the search form? I got that from another forum post.

    #access {
    background:none repeat scroll 0 0 #137C87;
    }

    .page .entry-title {
    color:#7A8D39;
    }

    #page {
    margin-top:0;
    }

    #branding #searchform {
    display:none;
    }

    #branding .only-search + #access div {
    padding-right:0;
    }

    .singular.page .hentry {
    padding:.1em 0 0;
    }

    .menu-menu-container {
    text-align:center;
    }

    ul.menu {
    display:inline-block;
    }

    #882420

    This is so screwy. The “corrected” selector I last mentioned shows up in the twenty eleven demo site, but it is different from what is in YOUR site. I guess I can no longer use the wordpress theme demos to figure out CSS for people when I can’t see their site.

    Change the first bit back to this.

    .menu-navigation-menu-container {
    text-align: center;
    }
    #882424

    soulbearth
    Member

    Victory is ours! Thank you for all your help. I greatly appreciate people with your skills and patience.

    #882428

    sl1k
    Member

    Thread moved to CSS forum section

    #882439

    You are welcome, thanks and sorry for the runaround. I didn’t realize there was a difference in the CSS between what we are all using and the demo site.

The topic ‘Center text in custom menu for 2011 theme’ is closed to new replies.