html - max-width does not have effect on iPhone -


i trying make webpage appear page width equal of phone screen. so, example, resolution of html page resolution of phone screen viewing it. if it's viewed on computer, want shown in div white boarders on side. so, did in css:

html {   max-width: 400px;   margin: 0 auto; } 

but whole page zoomed out on iphone screen, when iphone screen has width less 400px? why? how can fix this?

update - screenshot below. enter image description here

http://jsfiddle.net/8kwve/2/

you try messing around responsive theme.

html

<head> //other stuff     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> </head> 

css

//iphone horizontal @media screen , (max-width : 480px) {     body{         width:100%;     }     //other code! } //iphone vertical @media screen , (max-width : 320px) {     body{         width:100%;     }     //other code! } 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -