-
AuthorPosts
-
November 1, 2017 at 1:19 pm #871199
Hi,
I would like to Display a menu for desktop and a seperate menu for desktop. The reason for this is that the menu have anchor links which are to navigate to sections which are designed differently for mobile and desktop and are hiddent based on device.
I have used the following which worked on desktop but not on mobile
Quick CSS
@media only screen and (max-width: 990px) {.hide-on-mobile { display: none !important; }}
@media only screen and (min-width: 990px) {.hide-on-desktop { display: none !important; }}Then using the menu css is
hide-on-desktop
when I want it to show on just mobile and
hide-on-mobile
when I want it to show on just desktopthis works for the desktop but not on mobile, just displays both menusand seems to ignore the hide-on-desktop css?
November 2, 2017 at 5:24 am #871539Hey trafiki,
Please try this instead:
@media only screen and (max-width: 989px) {.hide-on-mobile { display: none !important; }} @media only screen and (min-width: 990px) {.hide-on-desktop { display: none !important; }}
If that doesn’t work then post a link to your site and we’ll have a closer look.
Best regards,
RikardNovember 2, 2017 at 11:35 am #871605This reply has been marked as private.November 3, 2017 at 1:40 pm #872144Any update on this?
thanks in advance
November 5, 2017 at 10:17 pm #872830Hi,
For your hide-on-mobile try using the menu items IDs as classes like this:@media only screen and (max-width: 989px) {.menu-item-4022,.menu-item-4022,.menu-item-4023,.menu-item-4020,.menu-item-4021 { display: none !important; }}
This is because the burger menu is building a menu from the main menu and not adding your custom class, but taking the IDs from the main menu and creating classes with them.
Best regards,
MikeNovember 14, 2017 at 6:37 pm #876726Hello,
I have the same problem after the update. Before, i used “.hide-on-mobile”.
Now works only with taking the ID from main menu and creating classes. If you have a large menu it’s difficult to do.
Can you hide via menu, like before, with the custom class?
November 15, 2017 at 10:03 am #876996Sorry for late response but thank you Mike this worked a treat. Great support as always.
November 16, 2017 at 10:08 pm #877773Hi,
happy we could help.
Feel free to create a new ticket if you need something else.Thank you
Best regards,
Basilis -
AuthorPosts
- You must be logged in to reply to this topic.