Vaeianor
Vaeianor

Reputation: 179

media query not working on android emulator

I'm working on a phonegap app and trying to test it on android emulators. The emulator that I'm testing on is Nexus 4. Here is the media query that I'm using:

@media screen and (device-width: 384px) and (device-height: 592px) and (-webkit-device-pixel-ratio: 2) { //my css styles //nothing works here

}

Any ideas?

Upvotes: 0

Views: 671

Answers (1)

Slawa Eremin
Slawa Eremin

Reputation: 5415

Checkout, do you have this code in your template:

<meta name="viewport" content="width=device-width, initial-scale=1">

And as I know, Nexus don't have Retina, so you should remove:

-webkit-device-pixel-ratio: 2 

from your media-queries

Upvotes: 1

Related Questions