[Resolved] Sticky navigation

Home Forums Support [Resolved] Sticky navigation

Home Forums Support Sticky navigation

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1167663
    Sebastien

    Hi,
    I use Sticky navigation to fix my header at the top of my website.
    It works but… it uses Java script.
    Even if it is a low weight file: 8,2kb, it requierts jquery-core (/wp-includes/js/jquery/jquery.js) which is heavy: 94,6kb.
    Is there a way to do the same thing in CSS only? that would allow me to ban jquery.js file.
    tahnsk

    #1167809
    David
    Staff
    Customer Support

    Hi there,

    without the transition, yes you can use this:

    #site-navigation {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
    }
    #1167818
    Sebastien

    hey David,
    it doesn’t seem to work into my website.

    #1167824
    David
    Staff
    Customer Support

    Aah you have a merged header so you would have to stick the entire header like so:

    .header-wrap {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
    }
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.