• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

center menu buttons

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › center menu buttons

This topic is: resolved
  • This topic has 16 replies, 3 voices, and was last updated 12 years, 10 months ago by amazinglives.
Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • June 7, 2013 at 12:16 pm #44582
    katie
    Participant

    I want to center my menu buttons on my nav bar.  How do I do that with keeping the nav bar where it is?  I'm using the Enterprise theme if that makes a difference.

    http://www.integrityvasolutions.com
    June 7, 2013 at 12:26 pm #44585
    rfmeier
    Member

    Hello,

    Are you talking about centering the navigation links like this?

    https://www.diigo.com/item/image/40chg/8smi


    Ryan Meier – Twitter

    June 7, 2013 at 12:34 pm #44587
    katie
    Participant

    Yes!

    June 7, 2013 at 12:40 pm #44590
    rfmeier
    Member

    Okay,

    You will have to edit your style.css file like below;

    /* line ~301 */
    #nav ul {
        width: 950px;
        float: left;
        list-style: none;
        margin: 0;
        padding: 0 0 0 10px;
        text-align: center; /* set text-align to center */
    }
    
    /* line ~310 */
    #nav li {
        float: none; /* set float to none */
        list-style: none;
        margin: 0;
        padding: 0;
        display: inline-block; /* set display to inline-block */
    }

    Let me know how it turns out.


    Ryan Meier – Twitter

    June 7, 2013 at 12:44 pm #44595
    rfmeier
    Member

    One other thing. If you want to remove the dark bar (navline.png) on navigation link to the far right, add this style rule to your style.css file;

    /*  line ~329 */
    #nav li:last-child a {
        background-image: none;
    }

    As a warning, it will still show on older versions of Internet Explorer 7 or less... maybe 8.


    Ryan Meier – Twitter

    June 7, 2013 at 12:50 pm #44600
    katie
    Participant

    Great!  Thanks!

    June 7, 2013 at 12:51 pm #44601
    rfmeier
    Member

    You are welcome. I am glad I could help.


    Ryan Meier – Twitter

    June 7, 2013 at 12:54 pm #44604
    katie
    Participant

    Oh, one more thing...  how do I get rid of the dark lines in between each menu button?

    June 7, 2013 at 1:07 pm #44611
    rfmeier
    Member

    You can remove all dark line separators by removing the background image for all anchor tags in your style.css file like below;

    /* line ~316 */
    #nav li a {
    	color: #ffffff;
    	display: block;
    	font-size: 16px;
        margin: 0;
    	padding: 13px 17px 12px 15px;
    	text-decoration: none;
    	text-shadow: # 1px 1px;
    	position: relative;
    	background: none; /* set background to none */
    }

    I hope this helped.


    Ryan Meier – Twitter

    June 7, 2013 at 1:09 pm #44613
    katie
    Participant

    Thanks!!

    June 7, 2013 at 3:36 pm #44647
    rfmeier
    Member

    You are welcome. Glad I could help.


    Ryan Meier – Twitter

    June 14, 2013 at 5:35 pm #46000
    amazinglives
    Member

    Hello,

    I'm working on something similar.  I'm using Executive theme, placed the navigation menu under the header, and I want that menu centered under the header.  It is to the left now.

    Based on above, I did:

    .menu-primary ul,
    .menu-secondary ul,
    #header .menu ul {
    float: left;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0 0 0 10px;
    text-align: center;
    }

    .menu-primary li,
    .menu-secondary li,
    #header .menu li {
    float: none;
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-block
    }

    But it doesn't look any different.  I added text-align center; to the last section.  It centered, but the menu titles were in a column instead of across.  Any ideas?

    Thanks.

    June 14, 2013 at 5:36 pm #46001
    rfmeier
    Member

    Hello,

    Is a link available by chance?


    Ryan Meier – Twitter

    June 14, 2013 at 11:14 pm #46021
    amazinglives
    Member

    Unfortunately, I can't show it yet.  I can pull any part of the stylesheet or send you a pic of the screen.  Would either help?

    Thanks again.

    June 15, 2013 at 9:10 am #46093
    rfmeier
    Member

    I will take a look at the Executive demo and see what I can come up with.


    Ryan Meier – Twitter

    June 15, 2013 at 9:23 am #46094
    rfmeier
    Member

    Hello,

    The demo did not have a submenu present, but I was able to play around with the widget/header menu.

    The menu ul element will have to lose it's float value and set to display: inline-block. One of the parent div elements (I am not sure which) should have it's text-align set to center.

    In short, the menu li elements are already centered. The ul menu itself needs to be centered since it is floated.

    I hope this helps some.


    Ryan Meier – Twitter

    July 5, 2013 at 1:58 pm #49390
    amazinglives
    Member

    Thank you Ryan! Sorry I didn't post sooner. I went on vacation and thought I would have access to a computer there, but didn't. I just tried your suggestion and voila. Thanks again!!!

  • Author
    Posts
Viewing 17 posts - 1 through 17 (of 17 total)
  • The topic ‘center menu buttons’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble