Search code examples
javascriptcssscreen-resolution

Wrong screen resolution detected - Why is a smaller resolution detected?


I just noticed that my screen resolution is not right detected. If I use THIS and THIS I get a resolution of 1280 x 720. But if I look in my Windows options I have a resolution of 1920 x 1080.

So I set my resolution (in Windows) to 800 x 600 and checked it again in the links above. Now both are showing 800 x 600 too.

My questions:
Why is my higher resolution not detected by js/css?

I made a little "table" with the different resoutions (right windows/ left js,css):

enter image description here

It looks like the proportion between both values are the same for every pair.

EDIT: Thanks to Schlaus, I tried it with different queries und colors. And css is also detecting just up to 1280 x 720 and not higher.


Solution

  • The problem was the scaling in Windows 10. It was set to 150%. After changing it to 100% everything was displayed correctly.

    On desktop -> right click -> display settings