Target iPhone with CSS
By gilbitron in CSS on 27/02/2009 at 01:49 (Old Revision)
Views: 162
Tagged: css, iphone
URL: http://www.evotech.net/blog/2007/07/web-development-for-the-iphone/
Starter:
The logic of this is that only browsers that understand "screen" understand "only", and of these, only the iphone has a "max-device-width" of 480px. The reason for the anti-IE comments is that some versions of IE render CSS regadless of media type declarations.
Main Course:
<!--[if !IE]>?> <link media="only screen and (max-device-width: 480px)" href="iPhone.css" type="text/css" rel="stylesheet" /> <!?<![endif]?>







