Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone Full Screen Image

How do I go about making an image or section of the page full screen on the iPhone?

I have an image that is 480 x 320 and I want to pull that up full screen on the iPhone but it has to be within a webpage so that I can make the image a link back to the previous page.

Currently if I drop the image on a blank page and I open it up on the iPhone it just shows up in the top left corner.

like image 850
Smallinov Avatar asked Sep 23 '08 13:09

Smallinov


People also ask

How do I make my iPhone picture full screen?

To get full-screen photos, go to Settings > Phone > Incoming Calls > Full Screen.

How do I make my whole picture full screen?

Press the keys Option–Command–F to view image in Full Screen.


1 Answers

Hopefully I'm not in breach of the NDA here, but here goes.

Mobile Safari, by default, renders a page as if that page had been viewed by a desktop browser, with a default width of 980 pixels.

To change this behavior you need to explicitly declare the viewport, which you do via meta tags. If you declare the width to the constant device-width, it'll default to 320 instead of 980, and everything looks great.

<head>
    <meta name="viewport" content="width=device-width,user-scalable=no" />
</head>
like image 195
Hans Sjunnesson Avatar answered Oct 04 '22 04:10

Hans Sjunnesson