View Full Version : Text and Image Crawler - image crawl problem in IE 8

Code Red
04-02-2009, 02:08 AM
1) Script Title: Text and Image Crawler

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/crawler/index.htm

3) Describe problem:

First of all, this is a GREAT script - the best marquee/scroller I've come across.

However there is a slight problem/bug and (as usual) it involves Internet Explorer when using the script to show images with the width set to 100% the images only appear partway across, as you see here -

test site (http://www.cactusmarine.com/test)

As soon as you resize the window, it takes up the full width as it should. As far as I can tell, it's only Internet Explorer on the PC that does this. I only have v8, but I presume it's the same story with v7. Firefox, Opera, Safari, Mac & PC it works brilliantly.

Any ideas?

04-02-2009, 04:34 PM
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:

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="LTR" lang="en">


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<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:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">

placed just before your title tag in the head.