Generally, you should use the viewport meta tag. But its use is very unstable, mainly if you need a cross-platform web page.
It also depends on what content and css you have.
For my iPhone homepage, which should automatically change from portrait to lanscape, I use this:
<meta name="viewport" content="width=device-width; minimum-scale=1.0; maximum-scale=1.0; user-scalable=no">
If you need a custom size, you can also use the event:
<body onorientationchange="updateOrientation();">
with the appropriate functionality in your javascript:
function updateOrientation() { if(Math.abs(window.orientation)==90)
EDIT:
Seeing the source of the page, it seems you did it with a web editor, right?
OK, I understand. Your main div is 600 pixels wide. Screen resolution iphone 320x480. 600> 320, so it exceeds the borders of the screen.
Now we will do some simple operations:
320 / 600 = 0.53 480 / 600 = 0.8
Thus, you want to reduce the scale by 0.5 times and a maximum of 0.8 times. Allows you to change the viewport:
<meta name="viewport" content="width=device-width; minimum-scale=0.5; maximum-scale=0.8; user-scalable=no">
Martin May 22 '12 at 9:50 a.m. 2012-05-22 09:50
source share