Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1086848

    Hi guys,

    I have a transparent header which is fixed top.

    The problem is once we scroll down the page the navigation cannot be seen unless the background is dark. This is not the case with parts of the pages.

    So I was wondering if it can change from transparent to #292929 when we start scrolling down?

    It is also a problem on mobile menu so the dropdown would need the same background colour also.

    Login to follow..

    #1086849
    This reply has been marked as private.
    #1087008
    Rupok
    Member

    Hi there,

    Thanks for writing in! You can add this under Custom > CSS in the Customizer.

    .x-navbar.x-navbar-fixed-top {
      background: #292929;
    }
    
    @media only screen and (max-width: 979px) {
    .x-navbar {
      background: #292929;
    }
    }

    Hope this helps.

    Cheers!

    #1088214

    That’s great, is it possible to add some transparency? Say 80%?

    thanks

    #1088430
    Joao
    Moderator

    Hi There,

    Change the color from #292929; to rgba(41,41,41,0.8);

    Hope that helps

    Joao

    #1095471

    This is great – but can it stay transparent on tablet (and smaller) until the burger menu icon is pressed to open the menu?

    thanks

    #1095731
    Rupok
    Member

    Hi there,

    Thanks for writing back. Yes if you add the transparent background within media query :

    .x-navbar.x-navbar-fixed-top {
      background: #292929;
    }
    
    @media only screen and (max-width: 979px) {
    .x-navbar {
      background: rgba(41,41,41,0.8);
    }
    }

    Hope this helps.

    #1096782

    Sorry that doesn’t seem to have done anything – I have left the code in

    thanks

    #1096854
    Paul R
    Moderator

    Hi,

    Kindly replace the code provided above with this

    
    .x-navbar.x-navbar-fixed-top {
      background: #292929;
    }
    
    @media only screen and (max-width: 979px) {
    body .x-navbar {
        background:transparent;
    }
    
    body .x-navbar.x-navbar-solid {
             background: rgba(41,41,41,0.8);
    }
    }
    

    Then add this in Custom > Edit Global Javascript in the customizer

    
    jQuery(function($) {
         $('.x-navbar').toggleClass('x-navbar-solid');
    });
    

    Hope that helps.

    #1097034

    Hi,

    The custom CSS made it transparent and then the javascript turned it back again?

    I have left the code in

    thanks

    #1097201
    Nabeel A
    Moderator

    Hi again,

    Try adding the following code in Custom > Edit Global CSS

    @media only screen and (max-width: 979px) {
    body .x-navbar.x-navbar-solid {
        background: transparent;
    }
    }
    .x-navbar-bg-color {
        background: rgba(41,41,41,0.8) !important;
    }

    Then add this in Custom > Edit Global Javascript in the Customizer

    jQuery(function($) {
       $('.x-btn-navbar').click(function(){
           $('.x-navbar').toggleClass('x-navbar-bg-color');
       });
    });

    Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!

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