Fixing the main navigation to the top

  • Posted in : Editor
  • bilojb
    Participant

    Hey!

    I’d like to have the menu stuck to the top of the page, like it is when you scroll to the bottom – but all the time.

    I was told to post here to find out how to do it. Thanks!

    bilojb
    Participant

    I found this post: http://www.pixelwars.org/forums/topic/sticky-menu/

    But it’s for a different theme, but this is what I want to do – please help :)

    ahmetsali
    Keymaster

    Hi, try this custom css code;

    @media screen and (min-width: 992px) {
    	.is-menu-fixed .site-navigation { 
    		position: fixed; 
    		}
    	.is-menu-fixed.menu-invisible .site-navigation {
    		-webkit-transform: translate(0,0px);
    		transform: translate(0,0px);
    		opacity: 1;
    		}
            .is-menu-fixed .admin-bar .site-navigation {
                  top: 32px;
                   }
    }
    
    bilojb
    Participant

    Perfect this works, thank you ahmetsali!

    ahmetsali
    Keymaster

    you’re welcome, please don’t forget to rate the theme on themeforest if you liked it, thanks.

    valenrm
    Participant

    Hi,

    i would like to do the same thing, but, though I’ve choosen “Fixed Menu” on Theme options, it is not working.

    My url is puentesenelaire.com and I used this codes in Custom CSS for the header:

    h 1.site-title img { max-height: none; }

    . site-header { padding-bottom: 0; margin-bottom: 0; }

    @ media screen and (min-width: 992px) { .site-header .site-title { padding-top: 1.4em; } }

    Thanks!

    ahmetsali
    Keymaster

    @valenrm

    Hi, i just checked your page source code and it looks like you didn’t add the custom css code in this post, make sure you copy and paste the code in my previous post to Custom CSS box.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register