media query not working on android emulator

657 views Asked by At

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?

1

There are 1 answers

1
Slawa Eremin On

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