• 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

Mai Lifestyle – Center Primary Menu

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 › Mai Lifestyle – Center Primary Menu

This topic is: not resolved

Tagged: Mai Lifestyle pro, nav menu

  • This topic has 6 replies, 4 voices, and was last updated 6 years, 7 months ago by Rosesilk.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • May 26, 2019 at 8:42 pm #491349
    Rosesilk
    Member

    Hello,

    I am using the Mai Lifestyle theme. I would like the Primary menu to be centered (this is the menu that is black in the demo. It says "WELLNESS, RECIPES, BREAKFAST, LUNCH, ENTREES, and SIDES)

    Is there a way to get the menu items to center on the page?

    My site is in a staging area so I can't share a link. Here is a link to the demo site: https://my.studiopress.com/themes/mai-lifestyle/#demo-full

    Thank you!

    https://my.studiopress.com/themes/mai-lifestyle/#demo-full
    May 27, 2019 at 10:10 am #491361
    Brad Dalton
    Participant

    Center the entire menu, not the items.

    Try text-align:center https://www.w3schools.com/cssref/pr_text_text-align.asp


    Tutorials for StudioPress Themes.

    May 27, 2019 at 1:41 pm #491365
    Rosesilk
    Member

    Hi braddalton,

    Thank you for your response. I don't know how to center the entire menu. I have tried every way I can think of to use text-align but I can't get it to work. It's likely that I'm not using the right classes but I don't know how to make it right.

    Thank you,
    Julia

    June 9, 2019 at 10:47 am #491551
    joey
    Participant

    I was able to sort of center the demo menu by adding a margin left to the header what is does is spread out the menu items.. so it seems more centered..
    I think than the idea is you use the inspector on your browser like I did to just experiment with margins and maybe padding but text align is not effective under any of the css so far as I saw..again I just used the web inspector and tried different codes see below as the one that I saw worked best more or less.. anyway just looking around here and I did deploy this theme so I wanted to take a look..

    .genesis-nav-menu .menu-item {

    margin-left: 60px; -------This is the one I added
    position: relative;
    display: -ms-flexbox;
    display: -webkit-box;
    display: flex;
    -ms-flex: 0 0 auto;
    -webkit-box-flex: 0;
    flex: 0 0 auto
    }

    June 10, 2019 at 10:19 am #491559
    Rosesilk
    Member

    Wow! Thank you, Joey. I'll try this out.

    I really appreciate your help.

    Julia

    August 6, 2019 at 10:21 am #492855
    JiveDig
    Participant

    Hi Rosesilk,

    Sorry I missed this. We use flexbox for our menus so you can center it like this:

    .nav-primary .menu {
    	-webkit-box-pack: center;
    	-ms-flex-pack: center;
    	justify-content: center;
    }

    Lead developer of Mai Theme

    August 6, 2019 at 12:10 pm #492859
    Rosesilk
    Member

    Thank you! I appreciate the help. I'll add that this weekend.

    Julia

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 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