Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1369232
    Satchel L
    Participant

    Hello

    I am using the following code to change my nav bar style on scroll down. But I need help changing the sub menu height. As you see, when you scroll down and then hover over a menu item, the sub menu is no attached.

    .x-navbar .desktop .x-nav > li > a, .x-navbar .x-brand, .x-navbar .x-navbar-inner {
        -webkit-transition: height 2s, padding-top 2s;
        transition: height 2s, padding-top 2s;
    }
    
    .x-navbar .desktop .x-nav > li > a, .x-navbar .x-brand {
        -webkit-transition: min-height 2s;
        transition: min-height 2s;
    }
    .x-navbar.x-navbar-fixed-top .desktop .x-nav > li > a {
    height: 60px;
    padding-top: 20px;
    }
    
    .x-navbar.x-navbar-fixed-top .x-brand {
    max-width: 400px;
    padding:0;
    margin-top:5px;
    margin-bottom:-120px;
    }
    
    .x-navbar.x-navbar-fixed-top .x-navbar-inner {
    min-height: 60px;
    }
    jQuery(function($) {
    
    $(window).scroll(function(){
    
    if($(this).scrollTop()<=0) {
    $('.x-navbar').removeClass('x-navbar-fixed-top x-container-fluid max width');
    }
    
    });
    
    });
    
    jQuery(function($) {
     $(window).scroll(function() {
       if($('.x-navbar').hasClass('x-navbar-fixed-top')) {
         $('.x-navbar-fixed-top .x-brand img').attr('src','/wp-content/uploads/2016/12/LogoMark.png');
       }else{
         $('.x-navbar .x-brand img').attr('src','/wp-content/uploads/2017/01/Logo34.png');
       }
     });
    });
    #1369234
    Satchel L
    Participant
    #1369347
    Jade
    Moderator

    Hi there,

    Please add this code in the customizer:

    .x-navbar-fixed-top .desktop .sub-menu {
        top: 58px !important;
    }

    Hope this helps.

    #1369348
    Jade
    Moderator

    Hi there,

    Please add this code in the customizer:

    .x-navbar-fixed-top .desktop .sub-menu {
        top: 58px !important;
    }

    Hope this helps.

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