Reputation: 197
I'm doing HTML5 responsive website for both desktop and mobile. What is the actual browser width (portrait and landscape), for example Samsung Galaxy S3 has 720px resolution, but i normally find that browsing in portrait showing much less than that. any pointer on this? Thanks.
Upvotes: 1
Views: 780
Reputation: 163280
You are probably running into trouble with the viewport size.
Mobile browsers will have a virtual size for the page that is often more (and sometimes less) than the actual screen resolution. This viewport scaling can be controlled with a meta tag.
<meta name="viewport" content="width=device-width">
This page has more details. It's for iOS, but the concept is broadly applied: http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html
Upvotes: 1