Sticky nav on desktop

Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12013
    rtourtelot
    Member

    Instead of the nav scrolling off screen, then sliding down after the user scrolls down a bit, how do I get the nav to stay exactly as it is, same size, never moving from where it is?

    I tried this, but it didn’t seem to work:

    header .sticky {
    	position:fixed;
    	top:0;
    	left:0;
    	z-index:9999;
    	width:100%;
    	height:100px;
    #12014
    rtourtelot
    Member
    This reply has been marked as private.
    #12027
    Raghavendra
    Moderator

    To me it seems to be working. The nav bar stays exactly where it is right now when I scroll down. May be you were able to resolve the issue.

    #12028
    rtourtelot
    Member

    Well, I’ve been working on it, so it’s closer… but due to some function or other in the theme, the nav slides up a bit (image attached), and then resolves–which I’ve never seen happen before. It’s definitely something in the theme functions. Is there a way to remove the function that creates the second nav sliding down after the user starts scrolling, as it seems to be right around the same timing/scroll distance when the attached bug happens.

    Thanks!

    #12041
    Raghavendra
    Moderator

    Can you pls change the class name sticky to something else in the js/main.js at line number 165 –

     $('#header').waypoint('sticky', {
                        stuckClass: 'sticky',
                        offset: -100,
    

    and see if that helps? The sticky class adds some CSS styles and if you provide some other class, I guess the effect won’t be there.

    #12044
    rtourtelot
    Member

    This is exactly what I needed–thank you!!!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Sticky nav on desktop’ is closed to new replies.