The answers shown are incorrect! Samsung devices do not have the same resolution in both portrait and landscape modes, as Apple devices do. Also, why are you using min-device-width and max-device-width? Stick to permission! You do not want your design to display improperly with the wrong resolution! Do this, I guarantee that it works, because I use it all the time:
@media screen and (device width: 480 pixels) and (device height: 800 pixels) and (orientation: portrait) {styles} @media and (device width: 800 pixels) and (device height: 480 pixels) and (orientation: landscape) {styles} Drop the "only" rule! It's not obligatory! Use only pocket or screen values.
source share