I developed this script and tested it a lot, as well as had others use it in some different environments, and although we identified and fixed a lot of issues, this never came up. But I see what you mean, it happens in IE 7 too. I have 8 on another machine, but haven't tested your code in it.
Now, I generally use a valid URL DOCTYPE. So that's the first thing I checked. It took care of the problem here in IE 7. Change:
Code:
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="LTR" lang="en">
to:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html dir="LTR" lang="en">
Without that, you are most likely throwing all IE versions into what is known as 'quirks mode', where just about anything can and often does happen.
Incidentally IE 8 is actually much better with this script than earlier IE versions, so if 8 will render your page in its IE 8 Standards mode, the script should be fine in that browser. However, other stuff on your page might not. If this happens after the change to a valid URL DOCTYPE, you can always force IE 7 rendering mode in IE 8 with:
Code:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
placed just before your title tag in the head.
Bookmarks