My goal is to incorporate responsive web design into my project and I have specified the viewport size as follows:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
I expected this setting to adjust the viewport width based on the device's actual width. For example, a Samsung Galaxy Nexus with 720px width should result in a viewport size of 720px. However, it seems that the reported viewport size is only 320px, half of the actual width.
I am utilizing CSS media queries and I have verified using alert($(window).width());
The code looks like this:
<link href="css/mobile-medium.css" media="all and (min-width: 320px) and (max-width: 479px)" rel="stylesheet" type="text/css" />
Instead of:
<link href="css/mobile-large.css" media="all and (min-width: 480px) and (max-width: 767px)" rel="stylesheet" type="text/css" />
I'm confused about why this discrepancy exists! The issue persists not just on Android devices but also on iPhone 4(S).
How can one effectively match different css media queries when the reported sizes are so misleading?