A
A
Anatoly Kulishov2021-11-17 14:10:00
css
Anatoly Kulishov, 2021-11-17 14:10:00

How to remove site shift when scrollbar appears?

When a stripe appears, the site shifts to the left by a few pixels. How to remove this effect? So that, regardless of the presence / absence of a strip, the site is always in 1st place.
I found a lot of articles, but they are all quite old, is there already a more elegant way?
Without JS preferably)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lossyy, 2021-11-17
@lossyy

The layout should be correct, adaptive and initially not under 1920 pixels, but under 1900, taking into account that the scrollbar takes 20 pixels.

M
MeMoJlor, 2021-11-17
@MeMoJlor

There are different browsers. Everyone has different stripes, wide, narrow. Even in the same chrome, the old ones have a stripe, while the new ones do not take up a single pixel. To solve the problem, the site must be rubber.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question