View Full Version : clientHeight check not working in IE

01-23-2009, 12:17 PM
Hi all,
I'm trying to check the client's window height and then apply some proper css in some div classes.
The code I use does not work in IE6 and IE7.

<body onload="document.write(document.documentElement.clientHeight);">

I resize the window, I refresh the page and the height that the code returns, remains the same. I searched about it in google and it seems that the document.documentElement.clientHeight is compatible with IE, so I don't understand why is this happening

01-23-2009, 12:34 PM
Try putting it outside of ONLOAD event.