Site logo

Archived topic

How to make a header element/banner sticky?

3 replies · Started by Christian on May 11, 2022

Viewing posts 1–4 of 4

Hi guys,

I've created a small banner (with a header element) to sit below the sticky 'navigation as header'. Is there a way I can make the banner stick, too? I'll only display it on mobile in case that's relevant. Link to an example page below.

Hi there,

you can try adding this CSS:

@media(max-width: 768px) {
    .page-hero {
        position: sticky;
        top: 60px;
        z-index: 100000;
    }
}

Perfect, works.

Thank you, David!

You're welcome

This archived topic is closed to new replies.