Skip to content

Instantly share code, notes, and snippets.

@sherbondy
Created January 13, 2010 20:42
Show Gist options
  • Save sherbondy/276564 to your computer and use it in GitHub Desktop.
Save sherbondy/276564 to your computer and use it in GitHub Desktop.
// the @media stuff is for viewers on mobile devices
html {
overflow: hidden;
}
@media only screen and (max-device-width:480px) {
html {
overflow: auto;
}
}
body {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 10px; // could be a different value
overflow-y: scroll;
overflow-x: hidden;
}
@media only screen and (max-device-width:480px) {
body {
position: relative;
top: auto;
right: auto;
bottom: auto;
left: auto;
overflow: auto;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment