- This topic has 10 replies, 2 voices, and was last updated 9 years, 2 months ago by
Tom.
-
AuthorPosts
-
January 25, 2017 at 12:12 am #268037
Pete
Hi Tom, I have the following css to stop the menu going responsive, but since the latest update it has lost all it’s css when it narrows to ?768px
https://perthreliefteachers.com.au
/*******************/ /* .navigation - responsive*/ /*******************/ @media (max-width: 769px) { .menu-toggle, .main-navigation.toggled .main-nav > ul { display: none !important; } #menu-top.secondary-menu.sf-menu { display: inline !important; } .main-navigation ul, .main-navigation ul li:hover > ul, .sf-menu li:hover > ul, .sf-menu li.sfHover > ul { display: block; } .main-nav .sf-menu > li { float: left; clear: none; } .nav-aligned-center.nav-below-header .main-navigation .menu > li, .nav-aligned-center.nav-below-header .main-navigation .sf-menu > li { display: inline-block; } .main-navigation .main-nav ul ul { display: none; float: left; position: absolute; top: auto; left: 0; z-index: 99999; width:200px; text-align:left; } .main-navigation .main-nav ul ul ul { left: 100%; top: 0; } .mobile-bar-items { display: none; } #secondary-navigation #menu-top.secondary-menu.sf-menu li {text-align:center;} }January 25, 2017 at 12:14 am #268039Tom
Lead DeveloperLead DeveloperThe new version simplified the CSS needed to do this.
You can find the update CSS here: https://docs.generatepress.com/article/mobile-navigation/#initiating-the-mobile-navigation-at-a-different-width
January 25, 2017 at 12:17 am #268041Pete
The whole menu disappears with the new css when it responsifies
January 25, 2017 at 12:19 am #268044Pete
Got it back but the new css doesn’t do what my last css did… stops it responsifying
January 25, 2017 at 12:23 am #268046Tom
Lead DeveloperLead DeveloperAh you don’t want the mobile menu at all.
Where are you adding the CSS you initially posted? I’m not seeing it anywhere.
January 25, 2017 at 12:24 am #268047Pete
I’ve just deleted it and replaced it with your new css. The old one was losing all the menu css under 769
January 25, 2017 at 12:26 am #268048Tom
Lead DeveloperLead DeveloperI misunderstood – the CSS I linked to will initiate the mobile menu at a higher width than 768px. You’re trying to ditch the mobile menu all together.
In that case, the CSS you initially posted should work, but I’d have to see it re-added to the site (with caching/autoptimize turned off).
January 25, 2017 at 12:27 am #268051Pete
ok take a look now with the old css
January 25, 2017 at 12:30 am #268055Tom
Lead DeveloperLead DeveloperIn your CSS, you have:
.nav-aligned-center.nav-below-header .main-navigation .menu > li, .nav-aligned-center.nav-below-header .main-navigation .sf-menu > li { display: inline-block; }Replace it with:
.nav-aligned-center.nav-below-header .main-navigation .menu > li, .nav-aligned-center.nav-below-header .main-navigation .sf-menu > li { display: inline-block !imprtant; }January 25, 2017 at 12:33 am #268059Pete
Thanks Tom all working now. Cheers. Oh it’s going to be 103 F here tomorrow 😉
January 25, 2017 at 12:35 am #268061Tom
Lead DeveloperLead DeveloperI’m as Canadian as it gets – give me ice, skates and a hockey stick over that kind of heat any day. My wife on the other hand…
Glad it worked! 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.