Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #855104

    KHS K
    Participant

    Hey Guys,
    I’m looking for a Solution to make a sticky Submenu.

    This site shows perfectly how I mean it.
    https://www.nextbit.com/pages/meet-robin

    When I scroll, the Navmenu fades out and the submenu become sticky.

    Is there a Solution for this?

    Thank you
    regards
    Karli

    #855235

    Rupok
    Member

    Hi Karli,

    Thanks for writing in! You can set Fixed Top Navbar from Customize > Header > Navbar Position

    Hope this helps.

    Cheers!

    #855255

    KHS K
    Participant

    Hey,
    thanks for your response. I know that I can make my Navmenu fixed. I’m looking for a fixed SUBMENU (like in the link)

    When I scroll, the Navmenu fades out and the submenu become sticky.

    Thank you
    regards
    Karli

    #855396

    Thai
    Moderator

    Hey Karli,

    That is technically possible. However, that would fall beyond the scope of our support since it would require custom development.

    Thank you for understanding.

    #855583

    KHS K
    Participant

    ok

    maybe a workaround? 🙂
    Is it possible to make a Section in Cornerstone fixed? It could solve my problem when the first Section of every page is fixed.

    Thank You
    regards
    Karli

    #856011

    Rupok
    Member

    Hi Karli,

    Thanks for updating. You need to create the submenu within a section and let’s give it an ID on the ID field. Let’s say the ID is custom-submenu.

    Then you can add this under Custom > JavaScript in the Customizer.

    
    jQuery(document).ready(function($) {
      $(window).scroll(function() {
        var scrollPos = $(window).scrollTop(),
            custom-submenu = $('#custom-submenu');
    
        if (scrollPos > 80) {
          custom-submenu.addClass('fixed-submenu');
        } else {
          custom-submenu.removeClass('fixed-submenu');
        }
      });
    });

    Then add this under Custom > CSS in the Customizer.

    .fixed-submenu {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;  
    }

    Hope this makes sense. If you still have question, first do the suggested workarounds and provide your URL.

    Cheers!

    #856763

    KHS K
    Participant
    This reply has been marked as private.
    #857042

    Rupok
    Member

    Hi Karli,

    Thanks for updating. Kindly follow the previous reply carefully. We asked for your URL because without checking URL we can’t provide a tailored code for your setup.

    Hope this makes sense.

    Cheers!

    #857247

    KHS K
    Participant
    This reply has been marked as private.
    #857907

    Lely
    Moderator

    Hello Karli,

    Please update this CSS:

    .fixed-submenu {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;  
    }

    To this:

    .fixed-submenu {
      position: fixed;
      left: 0;
      right: 0;  
      z-index: 99999;
    }
    

    You may want to add background color with a little opacity for the section to standout against the content behind it.

    Hope this helps.

    #858273

    KHS K
    Participant

    Hey again,
    it works like charm. THANK YOU very much for your support. This is just one more thing why this Theme and the community around is so awesome.

    I’m aware that this kind of support is much more then I should expect, so once again thank you.

    regards
    a long time X Theme user
    Karli

    #858356

    Paul R
    Moderator

    You’re welcome! 🙂