Skip to Content
Home › Forums › Older releases › 0.9.x › Centering Menu Items
I would like to center the menu items and I found how to do it here:
http://www.smartmenus.org/forums/topic/smartmenu-dropdown-doesnt-work-if-main-menu-is-display-inline
The problem with this is when the menu changes to mobile mode it doesn’t work as before (the vertical menu doesn’t work).
Here is the desktop menu with correct centering: http://www.imagebam.com/image/8b12ac309322681
But here is the faulty vertical mobile menu: http://www.imagebam.com/image/0cf597309322683
How can I change the mobile menu back to default but keep the desktop menu centered?
Hmm, yes I have obviously forgotten to test it on mobile.
Anyway, just use the following additionally and it will fix it:
@media screen and (max-width: 640px) { #main-menu { text-align:left; } #main-menu > li { display:block; margin-right:0; } }
Cheers!
Thank you, that works great.
Much appreciated.
Username (required)
E-mail (required)
Enter the acronym for JavaScript? (required)
You will be emailed a link to set your password.
Username or Email Address
Password
Remember Me
Lost password?