Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1020929
    Adwin L
    Participant

    Hi there, I am currently working on: http://52.25.40.201/~johnsonmarquez/

    I used a code provided by X Theme support to allow my topbar to be included in the fixed nav through a child theme. This works perfectly, however the only problem is when I scroll back to the top of the page, the fixed nav remains, when usually every time you scroll to top the main navigation appears. Is there a code I can use to fix this? I’ve customized the fixed nav so they are both fairly different.

    Thank you!!

    #1021513
    Nico
    Moderator

    Hi There,

    Thanks for writing in.

    Try adding this in your customizer > custom > JS:

    jQuery(function($) {
      // On scroll
      $(window).scroll(function(){
        if( $(this).scrollTop() < 1 ) {
          $('.x-navbar').removeClass('x-navbar-fixed-top');
        }
      });
    
    });
    

    Hope it helps.

    Let us know how it goes.

    Thanks.

    #1036481
    Adwin L
    Participant

    Perfect, thank you!

    #1036898
    Prasant Rai
    Moderator

    You are most welcome. 🙂

    #1051245
    Adwin L
    Participant

    Hi again,

    If you take a look at the same site on Safari vs Crome, on Safari there is a white gap under the header on the homepage only that doesnt show up in chrome. I can’t figure out why/how to get rid of it! Could you please help me with this? http://52.25.40.201/~johnsonmarquez/

    #1051555
    Jade
    Moderator

    Hi Adwin,

    Please find and update this code:

    .x-brand {
        position: relative;
        bottom: 40px;
        left: 5%;
        background-color: rgba(255,255,255,.95);
        padding: 0px 70px 20px 20px;
        z-index: 999;
    }

    to

    .x-brand {
        position: relative;
        bottom: 40px;
        left: 5%;
        background-color: rgba(255,255,255,.95);
        padding: 0px 70px 9px 20px;
        z-index: 999;
    }

    Hope this helps.

    #1061787
    Adwin L
    Participant

    Hi, this did not work. Anything else I can try?

    #1061978
    Rupok
    Member

    Hi there,

    Let’s try this instead (replace previous):

    .x-brand {
      background-color: rgba(255, 255, 255, 0.95);
      bottom: 40px;
      left: 5%;
      padding: 0 70px 9px 20px;
      position: relative;
      z-index: 999;
      margin-bottom: -40px;
    }

    Hope this helps.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1020929 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>