Example code here: http://pastebin.com/95z3pftQ
I'm trying build a mobile page with a fixed header, and a "content" section, which will be filled external (sanitized, but otherwise arbitrary) HTML. I need to use iscroll
or something like it, because I need to support vertical/horizontal scrolling and zooming, which has no native equivalent.
The issue is that with the width=device-width
meta viewport directive, mobile Safari resizes all block-level elements to the width of screen, irrespective of the width of their contents, unless they have a width specified. iscroll
then looks at the width of the container (which is the width of the screen), and isn't aware that there's more content to scroll horizontally. So in this example, the computed width for div#container
on my iPhone is 290px, but the computed width for table#really-wide-content
is 1000px.
Is there somewhat to disable the effects of the meta viewport directive inside of one div on the page? Note that I can't know a priori how wide the content is, or what its html structure is like, though I can alter inline styles programmatically if needed.