Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Media Query Targeting iPhone 4 and iPhone 3G/3Gs

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #31292
    dhechler
    Member

    So I made a discovery today. When targeting the iPhone 4 with a media query,

    (max-width: 480px) 

    does not work as the iPhone 4’s pixels are doubled. You would have to use

    (max-width: 960px)

    which would screw up your browser version.
    So I use this media query for iPhone for and lower


    @media screen and (-webkit-min-device-pixel-ratio: 2), (max-width: 480px) {
    #div { css }
    }

    What do you think?

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.