You are here : Home - Resources - FAQ - Javascript Q4
FAQ - Javascript Q4
Q4:How do I detect what screen resolution the visitor is using?
A:There are lots of uses for knowing screen sizes, for example centering windows etc
All Browsers use the following
- screen.availHeight - the height of the screen in pixels minus any GUI stuff such as the windows taskbar
- screen.availWidth - the width of the screen in pixels minus any GUI stuff such as the windows taskbar
- screen.height - the height of the screen in pixels
- screen.width - the width of the screen in pixels
Test it for yourself
back to faq