Does the overflow-y: scroll property help prevent horizontal shift in Opera / Safari?

I use the following in my CSS to force vertical scrollbar in Firefox:

body {
  overflow-y: scroll;
}

Is this technique used in Safari and Opera? Some people say it is, and some say otherwise.

+3
source share
2 answers

The CSS rule overflow-y: scrollworks for me in:

  • Opera 10.10
  • Google Chrome 3.0.195.38
  • Mozilla Firefox 3.5.6

and, obviously, all versions of Microsoft Internet Explorer, where the scroll bar is always displayed.

Safari and Google Chrome use the same viewing mechanism, so maybe it works in Safari too :)

+3
source

It:

body {
  overflow-y: scroll;
}

Opera 11.01 Safari 5.0.3 Windows, :

html {
  overflow-y: scroll;
}

Opera .

0

Source: https://habr.com/ru/post/1727341/


All Articles