• 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

Centering the menu in Genesis Sample

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 › Centering the menu in Genesis Sample

This topic is: resolved
  • This topic has 7 replies, 4 voices, and was last updated 11 years, 7 months ago by gcampton.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • October 20, 2014 at 7:20 pm #128526
    gcampton
    Member

    I'm usually not too bad at hacking/playing around css issues using firebug but this one has got me.

    I can't figure out how to center the nav menu items. Maybe I was using depreciated alignment calls, I'm not sure. Anybody know?

    http://ablemowing.com.au/

    October 20, 2014 at 7:22 pm #128528
    Porter
    Participant

    This should do the trick (add it to style.css, preferably near the other navigation css):

    .genesis-nav-menu a {
    	text-align: center;
    }

    Buy me a beer? | Try DigitalOcean VPS Hosting

    October 20, 2014 at 8:32 pm #128547
    gcampton
    Member

    hmmm didn't seem to work. I changed 'a' then changed 'item' as well, didn't work. Cloudflare is in deve mode and cache cleared.

    .genesis-nav-menu .menu-item {
    	display: inline-block;
    	text-align: center;
    }
    
    .genesis-nav-menu a {
    	color: #333;
    	display: block;
    	padding: 30px 24px;
    	text-align: center;
    }
    October 20, 2014 at 9:00 pm #128552
    Porter
    Participant

    Try:

    .nav-primary .genesis-nav-menu {
            text-align: center;
    }

    Or

    .nav-primary .genesis-nav-menu .menu-primary {
            text-align: center;
    }

    Or

    .nav-primary .menu {
            text-align: center;
    }

    Or perhaps:

    .nav-primary ul {
            text-align: center;
    }

    Those are all the right identifiers, it's just a matter of finding out which will work.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    October 20, 2014 at 9:20 pm #128554
    Genesis Developer
    Member

    Go to line no 936 and replace the existing code with this new code

    
    .genesis-nav-menu {
        clear: both;
        display: table;
        font-size: 20px;
        line-height: 1;
        margin: 0 auto;
    }

    Hope that you're wanting this. if you're problem is solved then Please mark it as RESOLVED.


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    October 21, 2014 at 12:18 am #128571
    Brad Dalton
    Participant

    This works http://wpsites.net/web-design/center-align-nav-menu/


    Tutorials for StudioPress Themes.

    October 21, 2014 at 2:52 am #128592
    gcampton
    Member

    Thanks,

    this worked ;

    .genesis-nav-menu {
    	clear: both;
    	font-size: 20px;
    	line-height: 1;
    	width: 100%;
    	text-align: center;
    }
    October 21, 2014 at 2:53 am #128593
    gcampton
    Member

    Although I was pretty sure I tried that already...

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and 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