Question

I wanted to test my webpage in chrome to see how it would look for different screen sizes. I changed the device metrics in the settings menu in developer tools window, but when I entered screen.availHeight and screen.availWidth into the console they showed my screen size not the changed sizes. These values are vital to my webpage, so I'm asking if there's any options to get the screen sizes for the changed device metrics?

Was it helpful?

Solution

Try to use screen.width and screen.height instead. Worked for me

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top