The iPhone 5 has a longer screen and it's not catching my website's mobile view. What are the new responsive design queries for the iPhone 5 and can I combine with existing iPhone queries?
My current media query is this:
@media only screen and (max-device-width: 480px) {}
for me, the query that did the job was:
Just a very quick addition as I have been testing a few options and missed this along the way. Make sure your page has:
There is this, which I credit to this blog:
Keep in mind it reacts the iPhone 5, not to the particular iOS version installed on said device.
To merge with your existing version, you should be able to comma-delimit them:
NB: I haven't tested the above code, but I've tested comma-delimited
@media
queries before, and they work just fine.Note that the above may hit some other devices which share similar ratios, such as the Galaxy Nexus. Here is an additional method which will target only devices which have one dimension of 640px (560px due to some weird display-pixel anomalies) and one of between 960px (iPhone <5) and 1136px (iPhone 5).
None of the response works for me targeting a phonegapp App.
As the following link points, the solution below works.
You can get your answer fairly easily for the iPhone5 along with other smartphones on the media feature database for mobile devices:
http://pieroxy.net/blog/2012/10/18/media_features_of_the_most_common_devices.html
You can even get your own device values on the test page on the same website.
(Disclaimer: This is my website)