- This topic has 7 replies, 3 voices, and was last updated 8 years ago by
Drew.
-
AuthorPosts
-
March 14, 2018 at 7:35 am #519639
Drew
I’ve been working with trying to find an elegant way to reposition menu items between desktop and slideout menus without having to create two separate menus (which is always asking for disaster – clients never remember).
Right now, I’m getting it to work with a combination of custom CSS class for the menu items but that feels like a really clunky solution.
Are you aware of a way to reposition menu items other than using
display: none;and media queries?Example of what I’m doing: the “Buy Tickets” is far right on desktop but needs to be located at the top on mobile: https://www.screencast.com/t/4vvUnHZd7Ao
March 14, 2018 at 10:52 am #519922Leo
StaffCustomer SupportHi there,
Your method should be good.
Or you can use the built in hide on classes: https://docs.generatepress.com/article/responsive-display/#using-our-hide-on-classes
March 14, 2018 at 11:04 am #519930Drew
Acknowledged and thanks.
That all seems focused on show/hide but what about re-ording without having to create duplicate versions of menu items?
March 14, 2018 at 4:02 pm #520188Leo
StaffCustomer SupportSince you aren’t using slideout navigation on desktop, you can create a menu and assign to primary navigation, then create a second menu and assign to slideout navigation.
March 14, 2018 at 4:41 pm #520210Drew
Gotcha, that’s what I was hoping to avoid.
Any solutions in the pipeline that don’t require creating multiple versions of the menu?
March 14, 2018 at 5:45 pm #520244Leo
StaffCustomer SupportNo that will require some complicate coding I think.
March 14, 2018 at 7:32 pm #520289David
StaffCustomer SupportYou can try using a flex container on the slide out navigation and then assign an order to the menu items.
.slideout-navigation .slideout-menu { display: flex; flex-flow: column nowrap; }And then give the menu item you want at the top a class with the property:
order: -1;That will push it to the top.
March 15, 2018 at 6:26 am #520585Drew
That’s a really good idea David, thanks. I’m not as fluent with flex as I should be and I thought it wasn’t 100% compatible with all major browsers at all media queries but I can look that up easily enough.
-
AuthorPosts
- You must be logged in to reply to this topic.