How to set viewport meta for iPhone that handles rotation properly?
Posted
by Caffeine Coma
on Stack Overflow
See other posts from Stack Overflow
or by Caffeine Coma
Published on 2009-08-04T21:27:35Z
Indexed on
2010/06/03
4:04 UTC
Read the original article
Hit count: 674
So I've been using:
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/>
to get my HTML content to display nicely on the iPhone. It works great until the user rotates the device into landscape mode, where the display remains constrained to 320px.
Is there a simple way to specify a viewport that changes in response to the user changing the device orientation? Or must I resort to Javascript to handle that?
© Stack Overflow or respective owner