There’s no CSS code which works in every theme to center align your nav menu.
You’ll need to use a tool like Firebug or Google Chromes Inspector to find the correct classes.
Tested on the Genesis Sample child theme, this code can be used to center your primary and/or secondary navigation menus.
Center Primary Menu
.nav-primary {
text-align: center;
}
Center Secondary Menu
.nav-secondary {
text-align: center;
}
Clearly, this CSS will not work on every Genesis child theme or non Genesis themes.
I’ll be adding more code which works with different themes in the near future.
Was This Tutorial Helpful?