iPhone viewport size

Posted on the February 15th, 2009 under Computers,Web design by Martin Bergek

This information is from 2007 but every time I make a web page for the iPhone I have to go and search for it.

The iPhone Safari browser does a good job of presenting just about any web page on its relatively small display. In so doing, it assumes that whatever web page it is displaying was designed for a much bigger display. To design a web page targeted for the iPhone and not have the phone shrink the web page to oblivion one must therefore add a meta tag to the head section of the HTML file:

<meta name="viewport" content="width=320, user-scalable=yes">

  • Share/Bookmark

Leave a Reply




XHTML::
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>