Grow your CSS skills. Land your dream job.

#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:

Comments

  1. 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

  3. YING WAN
    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

Markdown is supported in the comment area, so you can write inline code in backticks like `this` or multiline blocks of code in in triple backtick fences like ```this```. You don't need to escape code in backticks, Markdown does that for you.

Sadly, it's kind of broken. WordPress only accepts a subset of HTML in comments, which makes sense, because certainly some HTML can't be allowed, like <script> tags. But this stripping happens before the comment is processed by Markdown (via Jetpack). It seems to me that would be reversed, because after Markdown processes code in backticks, it's escaped, thus safe. If you think you can fix this issue, get in touch!

If you need to make sure the code (typically HTML) you post absolutely posts correctly, escape it and put it within <pre><code> tags.

Current ye@r *

*May or may not contain any actual "CSS" or "Tricks".