- This topic has 10 replies, 5 voices, and was last updated 4 years, 2 months ago by Leo.
-
AuthorPosts
-
February 22, 2017 at 4:01 pm #282712Dave
Hey Tom,
Looking at this documention, I implemented the CSS to open sub-menus to the left:
https://docs.generatepress.com/article/navigation-dropdown/
However, I’m looking to only apply that to the furthest right drop down menus, not to all of them. The far right ones go off screen so I’d like them to open to the left. The others, I’d like to have them open like they are set to in default, to the right. Is that possible?
Thanks!
– DaveFebruary 22, 2017 at 5:22 pm #282734LeoStaffCustomer SupportHi Dave,
First add
open-left
to the Custom Classes field for the far right menu item:
https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-classesThen replace the CSS from the doc page with this:
.dropdown-hover .main-navigation ul .open-left ul { left: auto; right: 0; } .dropdown-hover .main-navigation ul .open-left ul ul { left: auto; right: 100%; } .dropdown-hover .main-navigation .main-nav ul .open-left ul li.menu-item-has-children > a { padding-left: 0; padding-right: 20px; } .dropdown-hover .main-navigation ul .open-left ul .menu-item-has-children .dropdown-menu-toggle { float: left; padding-left: 20px; padding-right: 15px; } .dropdown-hover .main-navigation .open-left .children .dropdown-menu-toggle:before, .dropdown-hover .main-navigation .open-left .sub-menu .dropdown-menu-toggle:before { content: "\f104"; }
Let me know.
February 22, 2017 at 5:40 pm #282739DaveAw wow I should have known that. Thank you Leo!
February 22, 2017 at 5:41 pm #282740LeoStaffCustomer SupportWasn’t easy for me either haha You’re welcome π
June 14, 2017 at 5:47 am #333390Jay MartinMight I suggest this solution be added to the KnowledgeBase article referenced by the OP?
I came upon that great page yesterday, but it took quite a while using Search to find this more appropriate solution.
Thanks!
June 14, 2017 at 8:47 am #333494LeoStaffCustomer SupportI agree π
June 14, 2017 at 9:25 am #333519TomLead DeveloperLead DeveloperDone π
June 14, 2017 at 9:26 am #333521Jay MartinOutstanding, thanks for the fast response.
June 14, 2017 at 9:27 am #333523TomLead DeveloperLead DeveloperThanks for the suggestion π
February 19, 2020 at 9:53 am #1170667litesprintHi Dave,
First add open-left to the Custom Classes field for the far right menu item:
https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-classesThen replace the CSS from the doc page with this:
This doesn’t seem to work anymore when dropdown is set to the right in Customizer. Only the icon moves to the left, but the dropdown still opens to the right (and gets cut off). Reverted it back to the original.
Update: Works now. Used the CSS from the documentation article and added the custom class manually.
February 19, 2020 at 5:09 pm #1170987LeoStaffCustomer SupportHi there,
Any chance you can open a new topic for this as this one is really old?
Make sure to implement this method here and link us to the site in question if it still doesn’t work:
https://docs.generatepress.com/article/navigation-dropdown/#opening-specific-sub-menus-to-the-leftThanks π
-
AuthorPosts
- You must be logged in to reply to this topic.