Tagged: x
-
AuthorPosts
-
November 26, 2016 at 3:15 pm #1271649
Bark201ParticipantOn pc the menu is sticky but on mobile devices only the logo is sticky, the hamburger menu is not. How do I make the hamburger menu (top menu) sticky on mobile devices? The logo is sticky already. By sticky I mean when you scroll down the page on mobile devices the logo is still displayed but the menu isnt. I hope I am clear.
November 26, 2016 at 3:23 pm #1271654
Bark201ParticipantI searched the forum after I posted this and saw the following css:
@media (max-width: 979px) { .x-navbar-fixed-top { position: fixed !important; } }That makes the menu sticky, but in one page I have an image inside the content at the top and when its scrolled down on a mobile phone and then scrolled back to the top the logo is covering the image. This didnt happen before so I`m assuming its because of that CSS. How do I exclude one page or multiple pages from the sticky navigation menu on mobile phones?
November 26, 2016 at 8:50 pm #1271844
Rue NelModeratorHello There,
Thanks for writing in! To exclude a page or multiple pages, please have the code updated and use this instead:
@media (max-width: 979px) { .page-id-123 .x-navbar-fixed-top, .page-id-456 .x-navbar-fixed-top { position: fixed !important; } }Please noticed that we are using a custom class
.page-id-{ID}which denotes the page ID number. To know where you can find the page id number, please check it out here: https://community.theme.co/kb/how-to-locate-post-ids/Hope this helps.
November 27, 2016 at 3:32 am #1272007
Bark201ParticipantI tried it, it fixed it on that page but the sticky menu stopped working on other pages that I didnt exclude, all of them by the looks of it. Please help.
November 27, 2016 at 3:38 am #1272008
ChristopherModeratorHi there,
Please update your code:
@media (max-width: 979px) { body:not(.page-id-123) .x-navbar-fixed-top, body:not(.page-id-456) .x-navbar-fixed-top { position: fixed !important; } }Now menu should be fixed on all pages except on pages with IDs 456 and 123.
Hope it helps.
November 27, 2016 at 4:50 am #1272029
Bark201ParticipantYes, that fixed it, thank you.
November 27, 2016 at 4:53 am #1272030
ChristopherModeratorYou’re welcome.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1271649 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
