Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 96636

allihop on "Can't center-align navigation menu in theme Mystile"

$
0
0

Hi,

Site: http://www.allihop.dk

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:      http://example.com/twenty-thirteen-child/
 Description:    Mystile Theme
 Author:         None
 Author URI:     http://example.com
 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,

//Daniel


Viewing all articles
Browse latest Browse all 96636

Trending Articles