Popups shifting due to browser scroll bar (SOLVED)

Can’t reply to old topics (this should be changed) so I had to make a new one.

The solution is to always show the scrollbar with some HTML. That way, no matter what changes on the screen, your elements are always centered.

The code is:

html {
overflow-y: scroll;

So just stick an HTML element anywhere on the page and input that code.


Thanks for posting that solution. I have one problem with ith though. It works perfectly until the first time I close a popup. When I close it I suddenly have two scrollbars showing on the right. Any idea what I could do about that or why that happens? The layout starts shifting again for me with the two scrollbars.

1 Like

Sounds like this isn’t ISN’T SOLVED?

It solved the original poster’s problem so the original poster marked it solved.

If you’re having issues you should start a new thread.

HI Is there a solution to this this html hack just creates a double scroll bar

solved add empty html and add condition when pop is visible HTML:
html {
overflow-y: scroll;