Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Force to display the scrollbar even on pages which are smaller than the viewport height #32

Open
wants to merge 1 commit into from

1 participant

@denisjacquemin

Inspired by http://html5boilerplate.com/docs/#The-style

IE removes a scrollbar area if, the page is smaller than the viewport height, so when you click into a page which is longer, it appears as though there is a pixel shift but only a scrollbar appears on the right. So, overflow-y: scroll forces it to display the scrollbar even on pages which are smaller than the viewport height.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 30, 2011
  1. @denisjacquemin
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 0 deletions.
  1. +3 −0  stylesheets/base.css
View
3  stylesheets/base.css
@@ -24,6 +24,9 @@ hr {height: 1px; border: 0; }
p { margin: 15px 0;}
a img { border: none; }
+/* Inspired by http://html5boilerplate.com/docs/#The-style - Always force a scrollbar in non-IE */
+html { overflow-y: scroll; }
+
body {
font-size: 12px;
font-family: sans-serif;
Something went wrong with that request. Please try again.