How to write a media query for Galaxy Note 5

I need a media query code in both landscape and portrait modes for the Samsung Galaxy 5 note. I use the following media query, but I think this is wrong:

@media only screen and (max-width: 640px) and (orientation : landscape) {} 

Am I missing something, or is it right?

+6
source share
3 answers

Trying to go after each device is a crazy errand. Don't call you a fool, it says lol;) Devices often change according to their latest OS update. use resolution instead and leave enough margin of error to account for most devices. However, if you decide to embark on this mission, use this:

 /* Portrait and Landscape */ @media screen and (device-width: 360px) and (-webkit-device-pixel-ratio: 3) {} 

As long as you use your widths to 100%, and your body has a groove of at least 15 pixels wide, your width will be adapted accordingly.

My advice is to use an adaptive framework like Bootstrap, especially Bootstrap4, which it runs on large mobile devices like iPhone6 ​​and Notes

+5
source

Here is a good website if you want to try setting up specific devices. I would post the information, but the list and database are quite large. http://viewportsizes.com/

0
source
 @media only screen and(max-width:360px) { //code here.. } 
-2
source

All Articles