Jump to content

Getting visible height and width


shadowayex

Recommended Posts

I'm looking for a cross-browser bit of code that will allow me to get the height and width of the visible area of the browser. Of course, this means that if scroll bars are present, the height and width need to reflect that as well.I've heard of tricks like window.innerWidth, document.body.clientHeight, etc., but I read that values and support may vary from browser to browser. I was wondering if anyone had a function or something that they used for a task like this.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...