-
AuthorPosts
-
January 27, 2024 at 5:43 pm #1432227
Hi,
how can I get a sticky menu on mobile view? Smartphone and tablet portrait mode?
A little transparent burger menu icon on the left or on the right would be my favorite solution :)Thanks in advance.
Best regards!January 28, 2024 at 12:29 am #1432247Hey northorie,
Typically a sticky header would be achieved with this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:@media only screen and (max-width: 767px) { .responsive #top #wrap_all #header { position: fixed; } }
but if you only want a sticky burger icon you could try this:
@media only screen and (max-width: 767px) { .responsive #top #wrap_all #header .av-burger-menu-main { position: fixed; } }
If this doesn’t help please include the url to the page in question so we can take a closer look.
Best regards,
MikeJanuary 29, 2024 at 7:59 pm #1432424Thank you! This helps alot :)
Is there a way to get the burger ivcon to have another front/background color than the one in the header?January 30, 2024 at 11:36 am #1432481Hi,
Are you looking to change the colour of the lines, or to have a background behind them?
Best regards,
RikardJanuary 30, 2024 at 3:58 pm #1432506Actually, I would like to try both to see what looks best
January 30, 2024 at 7:39 pm #1432541Hi,
Please try the following in Quick CSS under Enfold->General Styling:
.av-burger-menu-main a { background: red; padding-right: 10px; } .av-hamburger-inner, .av-hamburger-inner:after, .av-hamburger-inner:before { background-color: blue; }
Best regards,
RikardFebruary 10, 2024 at 12:55 pm #1433903HI,
I’ve made the menu on mobile sticky on my second page as well with this code:@media only screen and (max-width: 767px) { .responsive #top #wrap_all #header { position: fixed; } }
But it overlays the top of my website, so that not the whole text is visible.
Can you help?
Website on private content.Best regards!
February 10, 2024 at 2:10 pm #1433908Hi,
Try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:@media only screen and (max-width: 500px) { .responsive #top #wrap_all #main { padding-top: 81px !important; } }
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
After applying the css, please clear your browser cache and check.Best regards,
MikeFebruary 11, 2024 at 1:13 pm #1433989Hi,
thanks for your reply-
The code didn’t help. Menu is no longer fixed and there is a gap between header and menu.Do you have another solution?
Best regards!
February 11, 2024 at 1:50 pm #1433991Hi,
Perhaps you have an error in your css like a missing bracket, the css above doesn’t change the position, it only adds padding. Try removing the code above and add it to WordPress ▸ Customize ▸ Additional CSS, perhaps you should also check your custom css with a css validator for a missing bracket.
If it still doesn’t work then remove it so your site works as before, and include a admin login in the Private Content area so we can examine.Best regards,
MikeFebruary 11, 2024 at 2:36 pm #1433996Ah! Now I’ve got it :)
I replaced the original code instead of adding your new one *duh*Now it looks great and this thread can be closed.
Thank you!February 11, 2024 at 3:00 pm #1433997Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Sticky menu on mobile’ is closed to new replies.