#4: Forcing Scrollbars: Eliminating “Horizontal Jumps”

In this screencast I talk about how to force vertical scrollbars onto websites. Without doing this, pages with centered content can appear to "jump" to the left or right when going from a page that needs to vertically scroll to one that does not (and visa versa). I cover two different major techniques for doing this, since they both have their advantages and disadvantages between different browsers.

Links from video:


  1. Todd
    Permalink to comment#

    It’s nice to look through your screencast archives and come across something really simple but also something that has confused me for a long time. I knew this was possible but just couldn’t for life of me work out how it was done. Thanks

  2. Tav
    Permalink to comment#

    Thank you very much ! Good to know those tips. Greetings from Romania

    Permalink to comment#

    Thank you, it’s really a good video. But I’m wondering is it really a big deal for the little jump of the content =P

Leave a Comment

Posting Code

We highly encourage you to post problematic HTML/CSS/JavaScript over on CodePen and include the link in your post. It's much easier to see, understand, and help with when you do that.

Markdown is supported, so you can write inline code like `<div>this</div>` or multiline blocks of code in triple backtick fences like this:

  function example() {
    element.innerHTML = "<div>code</div>";

We have a pretty good* newsletter.