Your Ad Here

Posted By

anvilcity on 08/27/10


Tagged

iphone


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

polly42
shawntysco
stephcode
atomicbutterfly


CSS method for detecting iPhone


 / Published in: CSS
 

URL: http://iphone.wikidot.com/detection

  1. As a file link:
  2.  
  3. <link type="text/css" rel="stylesheet" media="only screen and (max-device-width: 480px)" href="iPhone.css">
  4.  
  5. Inside a stylesheet or style declaration:
  6.  
  7. @media handheld, only screen and (max-device-width: 480px) {
  8. /* overrides or style additions for iPhone */
  9. }
  10.  
  11. Or just to tweak Webkit:
  12.  
  13. /* This CSS increases the size of the paragraph elements */
  14. p {
  15. -webkit-text-size-adjust: 120%;
  16. }

Report this snippet  

You need to login to post a comment.