Width & Height of browser viewport.

T

Tom Cole

HI fellows, How can I get visible viewport dimensions of any browser ?

IE, Opera - document.body.offsetWidth & document.body.offsetHeight

Opera, Firefox, Netscape- window.innerWidth & window.innerHeight

Note that if you use document.body.offsetWidth & height, the body tag
may need to be parsed first. Also note that in Firefox and Netscape the
size returned by document.body.offsetWidth & Height is that of the
document, not the window (which would make sense, but IE doesn't see it
that way)...
 
R

rf

(e-mail address removed) wrote
HI fellows, How can I get visible viewport dimensions of any browser ?

Looks like those FAQ entries posted every day are working :). Wasn't it
just two days ago that this exact FAQ was posted? And commented upon
heavily.

Cheers
Richard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top