[thelist] document.body.clientHeight problems in IE6?
Peter-Paul Koch
gassinaumasis at hotmail.com
Wed Jan 23 06:07:03 CST 2002
>http://www.io.com/persist1/log.php
>If this is the case, it's because - contrary to the approach taken in
>IE5.5 - IE6 considers document.body.clientHeight to be equivalent to to
>something /other than/ the height of the browser canvas, most likely the
>combined offsetHeight of some other subset of elements.
>
>Here is the code I use to define the position of the inline nav (which is
>a dynamically-created-and-appended element) - beware line breaks:
>
>HVal = document.body.clientHeight;
>InlineNav.style.top =
>((HVal - parseInt(document.body.style.lineHeight) * 2) + "px");
You might try document.documentElement.clientHeight . A while ago I found
out that when you use a DOCTYPE in IE6, several properties of document.body
are copied to document.documentElement (and their values changes slightly,
too).
But this is a much more complex matter than I thought at first (I thought
they would *only* be accessible through document.documentElement, which is
not true). Let me know if this helps.
ppk
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
More information about the thelist
mailing list