Support » Themes and Templates » Can't center-align navigation menu in theme Mystile

  • Resolved allihop




    I have successfully centered the main nav menu by creating a “Child theme” and adding the following in a style.css file:

     Theme Name:     Mystile Child
     Theme URI:
     Description:    Mystile Theme
     Author:         None
     Author URI:
     Template:       mystile
     Version:        1.0.0
    /* =Imports styles from the parent theme
    -------------------------------------------------------------- */
    @import url('../mystile/style.css');
    /* =Theme customization starts here
    -------------------------------------------------------------- */
    #header hgroup {
        float: none !important;
        text-align: center;
    #header #logo {
        float: none;
    #header #navigation,
    #header #navigation ul.nav {
        float: none !important;
    #header #navigation {
        margin: 0 auto !important;
    #header .nav-toggle {
        position: relative;
        margin-left: auto;
        margin-right: auto;

    This worked just fine from the start, but now the menu is again aligned to the left. I have fiddled around in the css sheets on main theme and perhaps i have come to undo something…

    I also have added the following in main themse “custom.css” file:

    /* Desktop styles go here */
    @media only screen and (min-width: 767px) {
        #primary-menu ul {
            display: table !important;

    Thanks in advance,


Viewing 3 replies - 1 through 3 (of 3 total)
  • allihop


    Solved it by overwrite existing ‘style.css’ in theme Mystile folder + overwrite the optional theme style ‘red.css’. By using “new” .css files in order to remove any “fiddle” from my side.

    Clear chache and update browser – it’s there again, centered as it should be.

    I am trying all these codes, and still can’t get my NAV to center…any thoughts?

    ugh seriously been trying to center my nav for hours.
    tried all the above.
    need help (or a miracle)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can't center-align navigation menu in theme Mystile’ is closed to new replies.