A
A
Arthur Koch2011-11-11 02:17:37
User interface
Arthur Koch, 2011-11-11 02:17:37

Always show scrollbar on page

I ran into a common problem. There are pages on the site with scrolling, and there are without it (little content). Because of this, when switching between pages, the site shifts to the side just by the width of this scrollbar. In IE, this problem is not present, because there the scroll remains with a small amount of content, but is blocked, but what about other browsers? As far as I remember, you can force browsers to always show it, but I forgot exactly how, and Google searches did not help. Please help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman, 2011-11-11
@dudeonthehorse

If only vertical scroll is needed:

body {
    overflow-y: scroll;
}

K
Kirill Mamaev, 2011-11-11
@r00tGER

And scrolling “not scrolling” bothers me more. Causes the feeling that just a couple of pixels something did not fit.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question