Tuesday, November 30, 2004

more problems with Internet Explorer 6 and the doctype

A few months ago I posted a small bit of information about the doctype declaration's effect on some random image/padding display properties.

Well tonight was a PAIN and the doctype declaration in IE6 was the culprit.

I had content hidden by styles until the page loaded, at which point I was making adjustments to the position (and Yes, I did try every CSS method first, there were some problems that couldn't be worked around). In order to shove an item of the page to the very bottom of the window, I needed to get the clientHeight in IE6 (this is window.innerHeight in NN and Mozilla, FYI)

Well, the numbers for clientHeight only matched the height of the content, not the actual height of the inside of the browser window. I finally found a few articles about this and discovered that the doctype declaration was what had caused the problem in IE.

Rather than reinvent the wheel, I'll just link you to two articles here and here that explain how to deal with this. The partial answer is that for clientHeight and some other properties (not all, mind you) you need to use document.documentElement.clientHeight.

Another night of frustration thanks to Internet Explorer's whacky partial implementation of standards.

0 Comments:

Post a Comment

<< Home