media query for galaxy s2

lior r picture lior r · May 16, 2012 · Viewed 7.7k times · Source

I have developed a responsive theme for my website, By using media queries on my css file.

it works fine on ipad/iphone and small android phones. When i get to galaxy S2 it seems to ignore my media queries.

This is the media query im using to target galaxy s2 and alike - is it correct ? if so , why isnt it working ?

@media only screen and (min-device-width : 480px) and (max-device-width : 800px)

thanks

Answer

Roko C. Buljan picture Roko C. Buljan · May 16, 2012

Your code should work.

Have you tried to add the 'orientation' like:

@media only screen 
and (min-device-width : 480px) 
and (max-device-width : 800px) 
and (orientation : landscape) {

}

@media only screen 
and (min-device-width : 480px) 
and (max-device-width : 800px) 
and (orientation : portrait) {

}