Centering the Primary Nav Menu ?
-
Arf! Arf!
I tried inserting this code into my Child theme:
.main-navigation { background: rgba(10,167,147,0.75); clear: both; display: block; text-align: center; position: relative; width: 100%; z-index: 2; }And didn’t quite get Full Center. Seems to still hang a little to the left. Anybody know how I can get a better result?
-
It’s already centred though? https://wp-themes.com/kelly/
Sounds like you need to link your website for us to help.
Thanks Andrew,
You’re sending me a link to the Kelly Demo.
Mine seems to add 1 extra Item to the Left: https://toolbox-4-websites.com/ .
The ABOUT menu is to the left of the “T” in “Toolbox” , and the CONTACT menu is below the middle of the “S” is “Websites” .I’m using Google Chrome v39 (64-bit). Do You see the leftward slide using Your Browser…or is it just mine ?
Odd, for some reason you have this:
.main-navigation div > ul:first-child { margin-left: 0; }I didn’t set that manually. Maybe the Plugin I just started using is doing that: https://wordpress.org/plugins/child-theme-configurator . I’ll try to change that and get back to you.
Thanks for finding it.
That code you showed me was part of the Parent theme’s CSS…NOT in my Child theme’s CSS. I Pasted a copy of this:
.main-navigation div > ul:first-child { margin-none: 0; }Into my Child theme…and it doesn’t change anything. This is where I continually mess up with Themes…I’m great at following instructions, and doing a COPY & PASTE. I just haven’t taken the time to learn the actual structure of HTML, CSS, and JS.
I Pasted a copy of this:
.main-navigation div > ul:first-child {
margin-none: 0;
}Do this instead:
.main-navigation div > ul:first-child { margin-left: auto; }Bingo…that worked !
Thank You…
The topic ‘Centering the Primary Nav Menu ?’ is closed to new replies.
