Site logo

[Resolved] Making Block Element site-header sticky

Home Forums Support [Resolved] Making Block Element site-header sticky

Home Forums Support Making Block Element site-header sticky

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2446489
    Erika

    Hi there,

    how could I make the Site Header Block Element sticky on desktop?

    Erika

    #2446532
    David
    Staff
    Customer Support

    Hi there,

    it is already sticky – isnt it ?

    I see this CSS:

    
    .stickycon {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
    }

    What am i missing ?

    #2446562
    Erika

    Sorry, yes. I solved this part, another problem comes from some place else. The main-navigation ist set to top:86px, that works on desktop.
    Was there actually another way without setting a margin-top to main-navigation to reach that the site-header and the main-navigation were just below each other and both sticky?

    For mobile:
    What should I change, so the site-header and main-navigation stay sticky and not under the mobile navigation when you scroll down?

    Thanks, Erika

    #2446605
    David
    Staff
    Customer Support

    You’re block element, you could simply change the Hook to: generate_inside_navigation this will place the element inside the nav container, and then you can just make the nav sticky.

    #2447223
    Erika

    Yep, that was it. Simple as usually, thank you, David.

    #2447845
    David
    Staff
    Customer Support

    I like simple 🙂
    Glad to be of help!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.