Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1282431
    Andreas Bjerve
    Participant

    Hi, I’m trying to create a fixed header that resizes the size of the logo (Andreas Bjerve) and the height of the navbar when the visitor scrolls down (like on this site: http://asbjornsenakupunktur.no/vidar-asbjornsen/)

    Can you help me with this?

    Thanks!

    (wordpress login will follow)

    #1282433
    Andreas Bjerve
    Participant
    This reply has been marked as private.
    #1282702
    Christopher
    Moderator

    Hi there,

    Please add following code in Customize -> Custom -> Global CSS :

    .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: all 0.2s linear;
        transition: all 0.2s linear;
    }
    .x-navbar.x-navbar-fixed-top .desktop .x-nav > li > a {
    height: 60px;
    padding-top: 25px;
    }
    
    .x-navbar.x-navbar-fixed-top .x-brand {
        font-size: 15px;
    }
    
    .x-navbar.x-navbar-fixed-top .x-navbar-inner {
    min-height: 60px;
    }

    Please add following code in Customize -> Custom -> Global javascript :

    jQuery(function($) {
    
    $(window).scroll(function(){
    
    if($(this).scrollTop()<=0) {
    $('.x-navbar').removeClass('x-navbar-fixed-top x-container max width');
    }
    
    });
    
    });

    Hope that helps.

    #1282713
    Andreas Bjerve
    Participant

    Really nice, thanks a bunch! How can I vertically align my navbar links? The alignment options in the Header menu does´nt seem to work for me..

    Thanks!

    #1282850
    Christopher
    Moderator

    Hi there,

    Navbar items align perfectly, please see the attachment.
    Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.

    Thanks.

    #1282865
    Andreas Bjerve
    Participant

    Ah yes, they do, thank you for your time!

    #1282962
    Thai
    Moderator

    If you need anything else please let us know.

    #1283540
    Andreas Bjerve
    Participant

    Hi there! This was really helpful, but now I´ve changed my logo and the re-size effect isn´t the same anymore. Could you please look into this? I´d like the logo- and NAV bar shrinkage to look like this: http://asbjornsenakupunktur.no, but ideally with a much slower animation/resize rate.

    thanks! (login info on the top of this thread)

    #1283766
    Jade
    Moderator

    Hi Andreas,

    I tried to check on this thread but I can’t seem to find what your actual site URL is.

    Would you mind providing the site URL that you are working on so we can check?

    Thank you.

    #1283767
    Jade
    Moderator

    Hi Andreas,

    I tried to check on this thread but I can’t seem to find what your actual site URL is.

    Would you mind providing the site URL that you are working on so we can check?

    Thank you.

    #1283779
    Andreas Bjerve
    Participant
    This reply has been marked as private.
    #1284149
    Christopher
    Moderator

    Hi there,

    Please update following blocks of code :

    .x-navbar .desktop .x-nav > li > a, .x-navbar .x-brand{
        -webkit-transition: all 0.5s linear;
        transition: all 0.5s linear;
    }
    .x-navbar.x-navbar-fixed-top .x-brand {
        font-size: 15px;
    }
    

    To :

    .x-navbar .desktop .x-nav > li > a, .x-navbar .x-brand, .x-navbar .x-brand img {
        -webkit-transition: all 0.5s linear;
        transition: all 0.5s linear;
    }
    .x-navbar.x-navbar-fixed-top .x-brand img {
        font-size: 15px;
        width: 150px;
    }
    

    Hope it helps.

    #1284204
    Andreas Bjerve
    Participant

    Hi, this work nicely, except that I also want the NAV bar height to descale proportionally, so as to match the new icon alignment. Could you achieve this?

    #1284243
    Paul R
    Moderator

    Hi,

    I am not sure what you mean by descale and I don’t see an icon.

    This is how it looks on my end.

    See Video – http://screencast.com/t/emOPSixn

    #1284365
    Andreas Bjerve
    Participant

    Hi, sorry, I meant “logo”.

    Yes, in your screencast the navbar shrinks exactly as I want it. But on my end it doesn´t. Strange… any ideas why this might be?

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