469,271 Members | 1,009 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

document.body.clientWidth & Mozila<1.1

Hello.

I've noticed that Mozilla browsers older than 1.1 release don't support
document.body.clientWidth but I would like to know dimensions of client
workspace area. How to get them? window.innerWidth returns information,
which includes width of scrollbar (this is not useful space). I
would like to subtract that value, but how to cope successfully with
that question?

Regards.

Sep 1 '05 #1
2 1667
X t l a n wrote:
Hello.

I've noticed that Mozilla browsers older than 1.1 release don't support
document.body.clientWidth but I would like to know dimensions of client
workspace area. How to get them? window.innerWidth returns information,
which includes width of scrollbar (this is not useful space). I
would like to subtract that value, but how to cope successfully with
that question?


Have a poke around quirksmode, it probably has everything you need:

<URL:http://www.quirksmode.org/viewport/compatibility.html>
--
Rob
Sep 1 '05 #2
> Have a poke around quirksmode, it probably has everything you need:
<URL:http://www.quirksmode.org/viewport/compatibility.html>

Thx. I prepared function like that:
return [document.body.clientWidth || document.width,
document.body.clientHeight || document.height];

which seems to be ok on the assumption that:
<body style="padding:0px; margin:0px;"> ...
Sep 1 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by higabe | last post: by
2 posts views Thread by Francesco Moi | last post: by
3 posts views Thread by webmasterATflymagnetic.com | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.