I have a CSS border on the HTML tag of my site, when I viewed it on the iPhone it didn't respect the border as part o开发者_StackOverflowf the width and some of the div's overlap as oppose to having a 10px gap between content and the sides of the screen. I used the meta viewport tag
<meta name="viewport" content="width=device-width, initial-scale=auto">
and this worked well as it now all lines up perfectly, however when I view the site in landscape mode the site is not centered, it starts off left aligned so you only see half the site until you scroll across.
How can I center the layout of the site when it is viewed in landscape mode?
Given that this question is now a little 'old' not sure if you solved your problem, but this link may help others. It helped me.
I've recently been looking at meta-viewport and came across this website article.
The Viewport meta-tag
Basically, dont use "width=device-width".
Instead just use "initial-scale" values.
精彩评论