You are here: Home » Programming » Web Tricks » IE DOCTYPE Strikes Again

IE DOCTYPE Strikes Again

OK, I understand IE's whole DOCTYPE quirks vs. standards (or strict) CSS variations (I don't agree, but I understand). But when did they decide to change their javascript as well (without backwards compatibility)?

http://aranea.zuavra.net/index.php/5 and http://www.quirksmode.org/js/doctypes.html

Basically, when you switch to standards mode, some of the IE proprietary javascript properties move from document.body to document.documentElement. document.body.scrollTop is now always 0 on a standards-compliant page, and the value can be found in document.documentElement.scrollTop instead.

Really, would it have been so hard to leave the document.body.scrollTop value? I know that the IE freaks love to tell us we should develop a million separate CSS files for each damn browser version they throw at us, but having to develop separate javascript as well is enough to make me want to jump up and down and scream violent profanities at my monitor.

Leave a comment


Type the characters you see in the picture above.