Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent Screen flicker when scrollbars appears

I have a javascript event that extends the height of the current page so the scrollbar appear. This causes the screen to jump a bit (to the left), as it is compensating for the scrollbars, which seems distracting and annoying. Any way to fix this?

like image 918
Jmumby Clasul Avatar asked Sep 05 '13 20:09

Jmumby Clasul


People also ask

Why does my monitor flicker when I scroll?

Screen flickering in Windows 10 is usually caused by a display driver issue or incompatible app. To determine whether a display driver or app is causing the problem, check to see if Task Manager flickers.

How do I make my scrollbar only appear when overflow?

Use overflow: auto . Scrollbars will only appear when needed. (Sidenote, you can also specify for only the x, or y scrollbar: overflow-x: auto and overflow-y: auto ).


1 Answers

html { margin-left: calc(100vw - 100%); } A bit late but found this fix here.

like image 164
orhon Avatar answered Sep 21 '22 00:09

orhon