Tagged: Burger Menu
-
AuthorPosts
-
October 31, 2022 at 12:56 pm #1370797
Dear support,
I would like the burger menu to appear at an earlier stage than the default.
How/where do I change this?I have seen various CSS-code in the support posts, but I cannot make it work – eg:
@media only screen and (max-width: 1400px) {.av-main-nav > li.menu-item-avia-special { display: block; }
Some advise needed.
Best,
Chrilles
October 31, 2022 at 3:42 pm #1370821try:
@media only screen and (max-width: 1399px) { nav.main_menu { display: block !important; } #avia-menu .menu-item { display: none; } .av-burger-menu-main.menu-item-avia-special { display: block; } }
PS: 1399px – This value is not obligatory, but I have made the habit to note the min-values with even values – and the max-values with odd values.
October 31, 2022 at 4:24 pm #1370823Thanks Guenni007
It works fine for both desktop and mobile – but I get 2 burger menus on the Tablet version – and the 2 burger menus are placed under and behind the logo that is placed in the left corner.So I still need some fixing :-)
It also looks like the breakpoint for the burger menu is still not working. Changing the value makes no difference.The CSS is active now on the site.
Best,
Chrilles
October 31, 2022 at 7:29 pm #1370849Hi,
Could you post a link to where we can see the actual problem? Thanks @guenni007 for helping out.
Best regards,
RikardOctober 31, 2022 at 10:11 pm #1370864Sorry, of course – here it is https://forcecertification.com/en/ – That has a double burger menu located on the left side. I would prefer one burger menu to the right.
The danish version https://forcecertification.com/da/ seems to have an issue with the main menu that goes into 2 lines – continuing in the banner where it is hard to see. It looks like the burger menu is behaving fine here.
Best,
Chrilles
November 1, 2022 at 5:16 pm #1370926Hi,
Thanks for that. Please try this in Quick CSS:
@media only screen and (max-width: 1198px) { #header_main_alternate { display: none; } .html_header_top #top .av_menu_left .main_menu { left: auto; right: 0; } }
Best regards,
RikardNovember 1, 2022 at 5:28 pm #1370930Thanks Rikard,
The double burger menu is gone now – but now there is no menu at all between 750 – 1198px.
Do you want login?
Best
ChrillesNovember 1, 2022 at 8:38 pm #1370967Hi,
Please try this CSS as well:
@media only screen and (min-width: 768px) and (max-width: 1198px) { #header_main #menu-item-search, #header_main li.av-burger-menu-main { display: block !important; } }
Best regards,
Rikard- This reply was modified 2 years, 1 month ago by Rikard.
November 2, 2022 at 2:47 pm #1371060Thanks Rikard,
I am a little confused here about how much CSS code I should add.
I have tried various combinations and I am not able to make it work. I have also tried to clear cache and test in other browsers.If you have time, please feel free to add the code and see if it is working. Se link in Private window
Best,
Chrilles
November 2, 2022 at 7:37 pm #1371131November 2, 2022 at 7:46 pm #1371140Thank you SO MUCH Rikard :-)
So appreciated!I have pasted the code below for others to use.
Is all the code needed?<pre><code>@media only screen and (max-width: 1198px) { nav.main_menu { display: block !important; } #avia-menu .menu-item { display: none; } .av-burger-menu-main.menu-item-avia-special { display: block; } } @media only screen and (min-width: 768px) and (max-width: 1198px) { .responsive #top .av-main-nav .menu-item-avia-special { display: block; } .responsive #top #wrap_all .main_menu { left: auto; right: 0; display: block; } #header_main_alternate { display: none; } }
November 2, 2022 at 8:11 pm #1371149Hi,
Yes, that is all the code that should be needed. I’m glad that we could help :-)
Best regards,
RikardNovember 4, 2022 at 11:01 am #1371313One more thing.
I see the main menu below the logo is now left-aligned. How do I align it to the right?
I haven’t been able to figure that out by looking in the CSS.Best,
Chrilles
November 4, 2022 at 3:37 pm #1371347Hi,
Please try this CSS as well:
.av-main-nav>li { float: right; }
Best regards,
RikardNovember 4, 2022 at 3:46 pm #1371351Thanks, Rikard, but it does not seem to work.
Also after clearing the cache and trying in an incognito window in 3 different browsers.
Can you see why?Please feel free to use the login provided in the private window in my prev. replies.
Best,
Chrilles
November 5, 2022 at 11:27 am #1371423Hi,
I’ve added it for you, and it’s working. Please review your site.
Best regards,
RikardNovember 7, 2022 at 10:40 am #1371628Super thanks Rikard, it is working now.
Best,
ChrillesFor anyone else
<pre><code>@media only screen and (max-width: 1198px) { nav.main_menu { display: block !important; } #avia-menu .menu-item { display: none; } .av-burger-menu-main.menu-item-avia-special { display: block; } } @media only screen and (min-width: 768px) and (max-width: 1198px) { .responsive #top .av-main-nav .menu-item-avia-special { display: block; } .responsive #top #wrap_all .main_menu { left: auto; right: 0; display: block; } #header_main_alternate { display: none; } } /*main menu align right */ .av-main-nav>li { float: right !important; }
November 7, 2022 at 10:49 am #1371630 -
AuthorPosts
- The topic ‘How to change the px for when the Burger menu appears?’ is closed to new replies.