Targeting iPhone 4 with CSS

Because the iPhone 4 has such a high resolution screen, the usual technique of detecting the device width in pixels (320 for previous versions of the iPhone) no longer works.

Thomas Maier has come up with a way to target the iPhone 4 specifically.

<link rel="stylesheet" media="only screen and (-webkit-min-device-pixel-ratio: 2)" type="text/css" href="../iphone4.css" />

Very useful indeed.