Tagged: x
-
AuthorPosts
-
April 20, 2016 at 3:48 am #891443
RifftParticipantHello guys,
I met a problem with my navbar and the top of the body on mobile and tablet.
You’ll find my credentials in the next post.Go to the home page on mobile and look at the top-alignment of the first picture.
Now, scroll down a little bit and go back to the top of the page. The picture moved behind the logo.I met the same problem on all pages, only on mobile and tablet.
Thanks for your help.
April 20, 2016 at 3:48 am #891444
RifftParticipantThis reply has been marked as private.April 20, 2016 at 10:14 am #891949
Paul RModeratorHi,
To fix it, you can add this under Custom > Edit Global Javascript in the Customizer.
jQuery(function($) { $(window).scroll(function(){ if($(window).scrollTop() <= 0) { $('.x-navbar').removeClass("x-navbar-fixed-top"); } }); });Hope that helps.
April 21, 2016 at 2:25 am #893170
RifftParticipantHello Paul R,
Thanks for your code, it’s working great.
However, there is a “jump” when you scroll up or down.Do you think there is another solution with something smoother ?
This is better than before anyway so thanks again !
April 21, 2016 at 9:17 am #893691
Paul RModeratorHi,
You can add this under Custom > Edit Global CSS in the Customizer.
body.x-navbar-fixed-top-active .x-navbar-wrap { height: 63px; }Hope that helps.
April 22, 2016 at 2:37 am #894904
RifftParticipantHello Paul,
It’s working, it’s perfect on mobile and tablet.
However, it creates a space on the desktop version, on all pages (see screen).Is there a way to implement this code only on mobile and tablet ?
Thanks
April 22, 2016 at 4:25 pm #895933
JadeModeratorHi there,
Please try to update the code to:
@media (max-width: 767px) { body.x-navbar-fixed-top-active .x-navbar-wrap { height: 63px; } }April 25, 2016 at 2:46 am #898221
RifftParticipantHello,
It’s working perfectly, thanks a lot !
April 25, 2016 at 8:19 am #898573
ChristopherModeratorYou’re welcome.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-891443 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
