Site logo

Archived topic

Top Bar: wish to have an option to make it floating

3 replies · Started by Marc on June 19, 2019

Viewing posts 1–4 of 4

I use the top bar for my contact information – it would be useful to have an option to make it floating, so it stays always visible.

Hi there,

you could try this CSS to make that happen:

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

.sticky-enabled .main-navigation.is_stuck {
    top: 40px !important;
}

Thank you, works. Still would be a nice option for a future release.

Glad to be of help. Some of these issues are easy to solve with a few lines of CSS, automating it becomes a lot more tricky as it would require Javascript to calculate the various heights for offsetting sticky objects - and JS can lead to a 'jumpy' experience. But we're constantly looking for improvements so we'll continue to look at what can be done.

This archived topic is closed to new replies.