Created
June 25, 2012 20:22
-
-
Save tvachon/2990997 to your computer and use it in GitHub Desktop.
Scrolling div compatible with iOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- a div for text to accompany the image --> | |
<div style="margin-top:50px;">DESCRIPTION TEXT CAN GO HERE</div> | |
<!-- Create a 600px wide div as a viewport to a wider image. Let webkit know that it should scroll when touched on mobile. --> | |
<div id="framecont" style="background-color:#ffffff; height: 100%; width: 600px; overflow: scroll !important; -webkit-overflow-scrolling:touch !important;"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes"> | |
<!-- Set pixel width in the div below to the width of your actual image --> | |
<div class="inside" style="width: 1000px;"> | |
<img src="image1000px_wide.jpg" /> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment