- This topic has 25 replies, 4 voices, and was last updated 3 years, 4 months ago by
Ying.
-
AuthorPosts
-
November 22, 2022 at 10:57 am #2427790
John
I just assigned the previously off-canvas menu
November 22, 2022 at 11:06 am #2427800Ying
StaffCustomer SupportThat’s a good start.
So you want the menus to be a hamburger icon on the desktop as well?
If so, go to customizer > layout > primary navigation, and set the mobile breakpoint to 999999px.
November 22, 2022 at 11:24 am #2427809John
Yes, the Hamburger should be there on all divices. Done and works
There’s the horizontal alignment left and we’re ready 🙂November 22, 2022 at 11:41 am #2427828Ying
StaffCustomer SupportThis CSS is for the desktop:
@media (min-width: 769px) { .main-navigation.toggled .main-nav>ul { display: flex; flex-direction: row; flex-wrap: nowrap; } }How do you want it on mobile?
November 22, 2022 at 12:07 pm #2427851John
Thanks for your speedy response Ying
The css works in the horizontal term but pushes down the items bellow the header.
Would it be possible to avoid that?
On mobile it would be fine to have the menu Verticaly.November 22, 2022 at 4:40 pm #2428078Ying
StaffCustomer SupportYes, try adding this CSS:
@media (min-width: 769px) { header#masthead { position: fixed; width: 100%; } .site { margin-top: 84px; } }November 22, 2022 at 4:51 pm #2428092John
hi there Ying,
thank you very much for your time and effort.
I did the sticky header with this css
header#masthead{position:-webkit-sticky; position:sticky; top:0;z-index: 999;}Like mentioned above, if you could check the site out, you’ll mention the dropdown push.
Would it possible to fix this and reduce the distance between the nav items a bit??November 22, 2022 at 5:16 pm #2428115Ying
StaffCustomer SupportYou will not need that sticky CSS for the desktop anymore, as I used
position: fixed;in my code.Like mentioned above, if you could check the site out, you’ll mention the dropdown push.
The dropdown push is not fixed by my code? Let me know!
To reduce the distance between menu items, try adding this:
.main-navigation.toggled .main-nav li { width: fit-content; }November 22, 2022 at 5:27 pm #2428120John
I tried your code but unfortunately the dropdown push is still there as your code has nothing
to do with the dropdown positioning but the sticky header.November 23, 2022 at 5:20 pm #2430154John
Hi there,
that’s how it worked
@media (min-width: 769px){ header#masthead{position: fixed; top:0;width:100%;z-index: 999;} .separate-containers{margin-top:80px;}}thanks for your assistance, time & effort
November 24, 2022 at 3:35 pm #2431977Ying
StaffCustomer SupportGlad to hear that and you are welcome 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.