Next.js Discord

Discord Forum

Certain components cause my layout to shift

Answered
Rhinelander posted this in #help-forum
Open in Discord
RhinelanderOP
I have overflow issue. Whenever certain components get trigger overflow goes from auto to hidden. That causes my navbar to move and it makes this really weird shift. I was looking in to something like

I tried this but it doesn't seem to work. I might be applying it to the wrong components. I tried body, navbar and container.
scrollbar-gutter: stable both-edges;


Any idea how might i solve this?
Answered by Rhinelander
Turns out I needed to apply scrollbar gutter to my html
html {
scrollbar-gutter: stable both-edges;
}
View full answer

1 Reply

RhinelanderOP
Turns out I needed to apply scrollbar gutter to my html
html {
scrollbar-gutter: stable both-edges;
}
Answer