Home › Forums › Support › Navigation Dropdown Click Menu Item: Is it possible to change the bahavior?
- This topic has 26 replies, 3 voices, and was last updated 6 years, 7 months ago by Tom.
-
AuthorPosts
-
November 16, 2017 at 9:45 pm #426443TomLead DeveloperLead Developer
I just adjusted the CSS above: https://generatepress.com/forums/topic/navigation-dropdown-click-menu-item-is-it-possible-to-change-the-bahavior/#post-420303
Let me know if it works better now π
November 16, 2017 at 10:14 pm #426460itcwizTom, this is perfect!!!!! It is exactly what I wanted. Thank you for your help!
November 16, 2017 at 10:16 pm #426463TomLead DeveloperLead DeveloperYou’re welcome π
January 21, 2018 at 6:11 am #476269itcwizHi Tom,
I updated today GP 2.0.2 and my functionality which I wanted in this post, does not fully work any longer. This means, if I am on a subpage, this css does not work any longer (I want, if I am on a subpage, that the navigation stays open, does not dissapear). Right now I have to hover again on the parent-page, so that the submenu appears again…
.main-navigation .main-nav li.current-menu-item .sub-menu {
display: block !important;
opacity: 1 !important;
}Can you please help me?
January 21, 2018 at 9:37 am #476452TomLead DeveloperLead DeveloperI just edited the previous code so it will work with GP 2.0.
January 21, 2018 at 1:50 pm #476618itcwizThank you so much! I tried it, but does not work. Any way, does the part make sense (it is the same two rows):
.main-navigation .main-nav li .sub-menu,
.main-navigation .main-nav li .sub-menu {
display: none !important;
}If I activate this, then the main menu does not expand at all …. If I take this out, the submenu does not stay opened on a subpage. Can you help?
January 21, 2018 at 9:52 pm #476765TomLead DeveloperLead DeveloperThink I see the issue. Can you try the updated CSS?: https://generatepress.com/forums/topic/navigation-dropdown-click-menu-item-is-it-possible-to-change-the-bahavior/#post-420303
January 21, 2018 at 10:07 pm #476771itcwizThank you Tom! It is almost perfect (petra.it-couture.ch). When I am on the main menu end hover over “Chalet Kristall”, and then click, the submenu opens. If I click on “Ausstattung”, for a moment the submenu slides to the right, and then back. Do you know how to fix this? Thank you for your support!
January 21, 2018 at 10:13 pm #476773TomLead DeveloperLead DeveloperYou currently have this:
.dropdown-hover .main-navigation:not(.toggled) ul li:hover > ul { left: 0px !important; }
Replace it with this:
.dropdown-hover .main-navigation:not(.toggled) ul li:hover>ul, .dropdown-hover .main-navigation:not(.toggled) ul li.sfHover>ul { left: 0px !important; }
January 21, 2018 at 10:26 pm #476776itcwizUnfortunately, there is still a shifting to left…Can you help? Thank you!
January 21, 2018 at 10:35 pm #476779itcwizTom, I fixed it! I added:
.main-navigation .main-nav li.current-menu-ancestor .sub-menu{
left: 0px !important;
}Thank you so much for your help! Your support is fantastic.!
January 22, 2018 at 8:51 am #477216TomLead DeveloperLead DeveloperGlad you got it working π
-
AuthorPosts
- You must be logged in to reply to this topic.