center align menu items
-
Hi, I’m hoping to center align my menu items instead of them sticking to the left of the menu bar. I’d like them to space evenly across the width of the page as well, but am having trouble finding where I should change this in the css. Thanks in advance for your help!
-
me too please, i can’t get them centered but did that to many other themes before π please advice!
Do you have a section of the dashboard named, “Custom CSS”?
yes, you can add your own css in the theme options, usually i’m using a child theme…
Add this;
#branding ul.menu { margin: 0 auto; display: table; }thanks andrew, looks nice, but unfortunately the menu isn’t responsive anymore -> doesn’t change to a drop down when being displayed on a small screen, u got a solution for this as well?
Try adding this underneath the above recommended code:
@media screen and (max-width: 767px) { #branding ul.menu { display: none; } }hi, a already have a @media entry, so i added your piece of code to it (at the and of my custom css)
@media screen and (max-width: 767px) { #branding #access-secondary, #branding #access-secondary ul.menu { display: block; margin: 0; } #branding ul.menu { display: none; } }but nothing changed
Did you clear your cache? I don’t see an issue.
yes, i tried it in firefox, ie 10 and safari, but in every browser the secondary menu still doesn’t change to a drop down menu when resizing the window
Can you post a link to a screenshot of the issue?
shure, here you go:
I’m sorry, your menu was like that before the change.
hey there,
try adding this to your custom css
.tinynav {
color: #111
}color should be something dark.
The topic ‘center align menu items’ is closed to new replies.
