- This topic has 11 replies, 3 voices, and was last updated 3 years, 3 months ago by
David.
-
AuthorPosts
-
December 6, 2022 at 12:19 am #2451149
Willya
Hi there,
I want to center logo only on mobile. Also, button and menu should below it as seen on the screenshoot I shared on private information.
December 6, 2022 at 12:32 am #2451159Fernando Customer Support
Hello Willya,
Can you try adding this CSS through Appearance > Customize > Additional CSS?:
@media (max-width: 768px) { .site-logo { flex-basis: 100%; text-align: center; } nav#mobile-menu-control-wrapper { order: 1; } nav#site-navigation { order: 2; } }December 6, 2022 at 1:13 am #2451201Willya
Hi Fernando,
Thank you! The CSS code is work well. But, I see that when I clicked the humberger menu, the drop down menu appear at the top of the humberger menu. Could you make it below the humberger menu and button?
December 6, 2022 at 1:17 am #2451203Fernando Customer Support
I see. I updated the code above. Can you try that instead?
December 6, 2022 at 1:26 am #2451212Willya
Yes, that’s perfect! Thank you!
Ah, one more question: How to make the menu and the button sticky only on mobile?Should I create a new ticket for this?
December 6, 2022 at 1:28 am #2451213Fernando Customer Support
You’re welcome!
I can answer it here. You can try turning on the Sticky Navigation for Mobile through Appearance > Customize > Layout > Sticky Navigation.
Reference: https://docs.generatepress.com/article/sticky-navigation/
December 6, 2022 at 1:35 am #2451215Willya
Yes, I have set the Sticky navigation to Mobile Only.
The menu appear on sticky navigation, but the button is not.
December 6, 2022 at 1:45 am #2451223Fernando Customer Support
I see. If you want that button to appear on sticky as well, you’ll need to hook it to
menu_bar_itemsfor instance. Can you try this and see how it goes?December 6, 2022 at 2:15 am #2451244Willya
I have made change the hook into
menu_bar_items. The button now is located to the right of the screen (on mobile). Also, the button located directly beside humberger menu on mobile.Maybe some CSS code can make it located on the left?
December 6, 2022 at 4:12 am #2451346David
StaffCustomer SupportHi there,
try this CSS to re-arrange the menu bar items on mobile:
@media(max-width: 768px) { .main-navigation { width: 100%; } .menu-toggle { flex-grow: 0 !important; } .menu-bar-items { order: -1; margin: 0 auto 0 10px !important; } }And in Customizer > Layout > Header switch to mobile view and reduce your left and right margin to
0December 6, 2022 at 7:25 pm #2452309Willya
Hi David,
Thank you so much for your help. Now, everything is perfect.
December 7, 2022 at 3:40 am #2452758David
StaffCustomer SupportGlad we could be of help!
-
AuthorPosts
- You must be logged in to reply to this topic.