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.
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
Post a Comment