There is an iframe here, which basically has more content than is inserted into the frame. The frame size is based on the size of the browser screen and allows you to scroll overflows, which works fine in all browsers except iOS. On iOS, Safari decides to resize the frame to fit the content. Not what you expect.
Sample jsFiddle code:
http://jsfiddle.net/R3PKB/2/
Try it on your iOS devices:
http://jsfiddle.net/R3PKB/2/embedded/result
HTML:
<div class="frame_holder"> <iframe class="my_frame">
CSS:
body { position: relative; background: #f0f0f0; } .frame_holder { position: absolute; top: 50px; bottom: 50px; left: 50px; right: 50px; background: #ffffff; } .my_frame { width: 100%; height: 100%; border: 1px solid #e0e0e0; }
css ios resize mobile iframe
Guido Bouman Jun 05 '13 at 10:04 on 2013-06-05 10:04
source share