AlfieWebDevTips Homefor new and experienced developers
[Home Home] [Web Development Web Development ] [Code Generators Code Generators ] [Resources Resources ] [Contact Us Contact ] |WebDevTips Privacy Privacy |
Print This Page

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




Google
 

[back to top of page]   

[labelled with icra -  - this link will open in a new window] [RSS Content]

[Copyright © WebDevTips]