- This topic has 9 replies, 3 voices, and was last updated 4 years ago by
Ying.
-
AuthorPosts
-
March 30, 2022 at 5:01 am #2172158
Andreas
Hi,
due to the closed topic on
https://generatepress.com/forums/topic/change-alignment-of-single-menu-item/here again my problem:
On my page the submenu opens not to the left, but on top of the menu item I’m hovering.Thanks
AndyMarch 30, 2022 at 5:35 am #2172191David
StaffCustomer SupportHi there,
in the document provided in that other topic ie.
https://docs.generatepress.com/article/navigation-dropdown/#opening-specific-sub-menus-to-the-left
Looks like you missed this part.
First add open-left to the Custom Classes field for the far right menu item.You need to:
1. Go to Appearance > Menus
2. Select the menu item that has the dropdown menu items.
3. Add a CSS Class to the menu item:https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-classes
The CSS Class has to be:
open-leftMarch 30, 2022 at 5:44 am #2172204Andreas
Hi David,
thanks for the quick reply.
I first added the class to “subpage 2”. And now also to the submenu “aaaa”.
But it still does not work…Best
AndyMarch 30, 2022 at 6:16 am #2172222David
StaffCustomer SupportIt has to be added to the
Page 2menu item.March 30, 2022 at 7:31 am #2172297Andreas
That did the trick 🙂
but it’s not possbible do do this only for the submenu (rollover “subpage 2”)?!
note: it’s important to set in “appearance -> customize -> general -> icon type” to “font” to get the icon defined in the css. Perhaps you can add this to the domumentation.
Thanks a lot
AndyMarch 30, 2022 at 7:36 am #2172301David
StaffCustomer Supportbut it’s not possbible do do this only for the submenu (rollover “subpage 2”)?!
Why would you want to?
If you have many sub-sub menus then would you not want to change all of them ?March 30, 2022 at 1:57 pm #2172905Andreas
Just want the first dropdown (rollover “page 2”) to the right and second level dropdown/flyout (rollover “subpage 2”) to the left.
March 30, 2022 at 2:56 pm #2172938Ying
StaffCustomer SupportHi Andreas,
Try this:
.main-navigation ul ul li { text-align: right; } .main-navigation ul ul ul li { text-align: left; }April 1, 2022 at 3:41 am #2174430Andreas
Hi Ying,
this just changes the orientation of the text in the dropdown.
But I figured it out now:
I removed this style change:
.dropdown-hover .main-navigation:not(.toggled) ul .open-left ul {
left: auto;
right: 0;
}so the first drowdown still goes to the right and second level goes to the left.
Thanks a lot
AndyApril 1, 2022 at 9:37 am #2174847Ying
StaffCustomer SupportAh ok, I didn’t understand your meaning correctly, sorry about that 🙂
Glad you figured it out!
-
AuthorPosts
- You must be logged in to reply to this topic.