After successfully formatting a website for various devices using an online responsive design tester and CSS declarations like
@media only screen and (max-width: 480px)
, I encountered an issue during testing on an actual iPhone. The browser was not computing these CSS declarations properly.
I attempted using max-device-width
as well as setting the initial scale with
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
. I also tried without the initial scale setting but to no avail.
In addition, I experimented with
@media screen and (-webkit-min-device-pixel-ratio: 2), screen and (max--moz-device-pixel-ratio: 2)
And also tried:
only screen and (-webkit-min-device-pixel-ratio : 2),
only screen and (min-device-pixel-ratio : 2)
Despite all these attempts, none have successfully targeted the iPhone 3/4. What could be missing in order to effectively target these specific iPhones?