Force Vertical Scrollbar

Avatar of Chris Coyier
Chris Coyier on (Updated on )
html {
  overflow-y: scroll;
}

This is invalid CSS, but it works in everything except Opera. The reason for this is to prevent “centering jumps” when navigating back and forth between pages with enough content to have a vertical scroll bar and pages that do not.