Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gscottolson/6ef20f8c751c9b9e6cca to your computer and use it in GitHub Desktop.
Save gscottolson/6ef20f8c751c9b9e6cca to your computer and use it in GitHub Desktop.
/**
* Add ipad IOS7 Classes
* Allows us to temporariliy try to fix the slight scroll 100% hack.
* http://stackoverflow.com/questions/19012135/ios-7-ipad-safari-landscape-innerheight-outerheight-layout-issue
*/
if (navigator.userAgent.match(/iPad;.*CPU.*OS 7_\d/i)) {
$('html').addClass('ipad ios7');
}
/**
* Fix for iPad iOS7 slight scroll on 100% body height
* http://stackoverflow.com/questions/19012135/ios-7-ipad-safari-landscape-innerheight-outerheight-layout-issue
*/
@media (orientation:landscape) {
html.ipad.ios7 > body {
position: fixed;
bottom: 0;
width: 100%;
height: 672px !important;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment