[Resolved] sticky menu when scrolling

Home Forums Support sticky menu when scrolling

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1219356
    carlos.marti@me.com

    Hi:
    I change the background color of the sticky menu when scrolling with this css:

    .main-navigation.navigation-stick {
    background-color: #0e466f ;
    }

    How can I change it again when it returns to the initial position.
    Thank you.

    #1219681
    David
    Staff
    Customer Support

    Hi there,

    that should work – but try this CSS selector instead:

    .main-navigation.is_stuck

    If it doesn’t can you provide a link to the site so i can see what the issue is.

    #1278991
    Lars

    Hi David

    Would that be the official way to change the color and transparency-changes happening to sticky nav-bar? (to change the properties of the class)

    #1279091
    David
    Staff
    Customer Support

    Hi there,

    When sticky the is_stuck class gets added to the main-navigation so you can target it like so:

    .main-navigation.is_stuck {
    /* sticky styles here */
    }
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.