How to center this menu?
-
I’m trying to get this menu to center. It’s not working, no matter what I try. I’ve used the WPEX Blogger theme, found here: https://www.wpexplorer.com/blogger-free-wordpress-theme
This is the navigation code:
/* Main Navigation ================================================== */ .sf-menu, .sf-menu * { margin: 0; padding: 0; list-style: none; } .sf-menu li { position: relative; text-align:center; } .sf-menu ul { position: absolute; display: none; top: 100%; left: 0; z-index: 10001; } .sf-menu > li { float: left } .sf-menu li:hover > ul, .sf-menu li.sfHover > ul { display: block } .sf-menu a { display: block; position: relative; } .sf-menu ul ul { top: 0; left: 100%; } .sf-menu { float: left } .sf-menu ul { min-width: 160px; *width: 160px; } .sf-menu a { zoom: 1 } .sf-menu li { position: relative; white-space: nowrap; *white-space: normal; -webkit-transition: background .2s; transition: background .2s; } .sf-menu li:hover, .sf-menu li.sfHover { -webkit-transition: none; transition: none; } .sf-menu .sf-mega { position: absolute; display: none; top: 100%; left: 0; z-index: 99; } .sf-menu li:hover > .sf-mega, .sf-menu li.sfHover > .sf-mega { display: block } /*styling*/ #site-navigation-wrap { background: #d9cdb3; font-family: 'Merriweather', serif; font-size: 12px; height: 40px; text-transform: uppercase; text-align: center;} #site-navigation .dropdown-menu li { display: block; float: left; height: 40px; line-height: 40px; } #site-navigation .dropdown-menu > li { margin-left: 25px; } #site-navigation .dropdown-menu > li:first-child { margin-left: 0; } #site-navigation .dropdown-menu a { font-size: 1.1em; color: #fff; font-weight: 400; text-decoration: none; text-align: left; cursor: pointer; border-top: 3px solid transparent;} #site-navigation .dropdown-menu > li > a:hover, #site-navigation .dropdown-menu > li.sfHover > a, #site-navigation .dropdown-menu > .current-menu-item > a, #site-navigation .dropdown-menu > .current-menu-item > a:hover { color: #fff; } #site-navigation .dropdown-menu > .current-menu-item > a, #site-navigation .dropdown-menu > .current-menu-item > a:hover{ border-color: #d9cdb3; }
Hope you can make something out of it. I need the text to be centered, not on the left as it is now. Except for the dropdown text.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to center this menu?’ is closed to new replies.