Thursday, November 15, 2012

[PhoneGap] Media Queries

What is the key to make media queries work in phonegap for iOS?  I am using phonegap 2.1 and xCode 4.5 with the media queries below.  The app always uses the portrait style sheet.  It always uses the dimensions of the app from the orientation at the time the app launched.  When I flip the iPad, it flips the page with the same dimensions of the same orientation.  I want it to automatically start using the style sheet of the new orientation.  Please point me in the right direction.

        <link rel="stylesheet" type="text/css" href="css/indexLandscape.css" media="all and (orientation: landscape)" />

        <link rel="stylesheet" type="text/css" href="css/indexPortrait.css"  media="all and (orientation: portrait)" />

-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at
For more info on PhoneGap or to download the code go to
To compile in the cloud, check out

No comments:

Post a Comment