iPhone 5 Media Query

Apples iPhone 5 has a larger display compared to its previous versions. If you need to target the iPhone 5 specifically then this CSS media query should get you out of trouble.

@media (device-height: 568px) and (-webkit-min-device-pixel-ratio: 2) {

  // iPhone 5 or iPod Touch 5th generation styles


Want to become a better web developer?

Join over 25,000 other developer & designers who get awesome links to the best news and articles each week delivered directly to their inbox.


  1. Awesome!

  2. Just about to start developing a new responsive layout and needed to look for this, saved me some time. Much appreciated 😉

  3. Thanks you! Very Helpful!!!

This post currently has 3 responses. What do you think?

You can use basic HTML when posting code, please turn all < characters into &lt; or > into &gt;
If the code is multi-line, use <pre><code></code></pre>

Leave a Reply

Your email address will not be published. Required fields are marked *