Fixed Navigation – Bottom border jumps a few pixels when scrolling

  • Posted in : Bloggy WP
  • vinofanten
    Participant

    Hi.

    Please see my blog http://www.pastaevinoblog.com/wordpress.

    I have adjusted the size of the navigation bar, but the light grey bottom border jumps down about 4px when scrolling (something to do with the code for the fixed navigation i presume?). I am using Safari Browser. How do I make fixed navigation bar the same as the normal bar at the top (before scrolling), withouth the light grey bottom border jumping down a few pixels and making the colored bottom borders for each nav bar link stay on top of this grey bottom border?

    ahmetsali
    Keymaster

    Hi, it is a flat shadow, if you want to remove it you can try this custom css code;

    .main-navigation.fixed, .main-navigation.fixed + .header-search {
        box-shadow: none;
    }
    
    vinofanten
    Participant

    Thanks. I do not want to remove it, however, I would just the the navigation bar including the shadow to stay the same even when scrolling? Is this possible without the search button and the colored borders jumping up a few pixels?

    ahmetsali
    Keymaster

    i see, try this one;

    .main-navigation.fixed {
        box-shadow: none; border-color: #eee;
    }
    .main-navigation.fixed + .header-search { top: 47px; }
    
    vinofanten
    Participant

    Thank you! Worked like a charm in Safari.

Viewing 5 posts - 1 through 5 (of 5 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