Content page is positioned in the center using the class .all
.all{ margin:auto; padding:0px; width:1000px; }
When a vertical scroll bar appears, the content shifts by some px to the left.
How to get rid of this bad "effect"?
Add to the body
overflow-y:scroll;
and the scroll bar will always be, and when the content zone is smaller in height than the height of the window, scrolling will not be active, but it will already take its place, and such a shift effect will not occur.
PS Property is invalid!
Well, it is logical that the appearance will shift to the left, because the display of the page already has less pixels in width. Since you have margin-left
and margin-right
to "automatic mode", the value of the fields changes with the width of the page. But in order for the content to remain in the middle of the display area, an offset effect occurs. I'm afraid that this can not be avoided ...
Source: https://ru.stackoverflow.com/questions/64075/
All Articles