Site logo

Archived topic

Make top bar sticky but -not- the navigation

1 reply · Started by Karel on July 8, 2022

Viewing posts 1–2 of 2

Hi, I want to make the top bar sticky, but not the navigation. The top bar contains the language switcher that I want to keep visible all the time.

I applied part of the method described here

and added this css

.top-bar.top-bar-align-right {
position: sticky;
top: 0;
z-index: 999;
}

The top bar now remains sticky but only until the header dissapears, scrolling any up further makes the top bar dissapear as well..
Any idea or help would be highly appreciated :)

Hi Karel,

Try this CSS instead:

.top-bar.top-bar-align-right {
    position: fixed;
    top: 0;
    z-index: 999;
    width: 100%;
}
This archived topic is closed to new replies.