farjam farjam - 8 days ago 6
CSS Question

iPhone 5 is not displaying the responsive mode of the website correctly

I have created this website, and so far I have not been able to find out why only on certain iPhone phones, the website is not displayed in its responsive mode. (it shows correctly on most iPhone phones).

Here is what I have done so far:


  1. Checked the website on Android devices: it looks good

  2. Check the responsive website on different browsers: it works

  3. Use online iphone simulators to see how the website looks: Shows fine

  4. Cleared browser cache and cookies on iPhone devices that have problem showing the responsive mode: Still no luck



Here is a screen shot of how the website homepage SHOULD look like in iphones.

enter image description here

Answer

try to use following media query

@media only screen 
and (min-device-width : 320px) 
and (max-device-width : 568px) { /* STYLES GO HERE */}

you are using max-width which is the width of the target display area where as max-device-width is the width of the device's entire rendering area.

i hope it will help you

Comments