You need to use a media query.
/* iPhone 4 ----------- */
@media
only screen and (-webkit-min-device-pixel-ratio : 1.5),
only screen and (min-device-pixel-ratio : 1.5) {
/* Styles */
}
EXAMPLE :http://jsfiddle.net/Svqt5/ (resize the browser window to see the media query work)
source: http://css-tricks.com/snippets/css/media-queries-for-standard-devices/