PDA

View Full Version : Drop-in Slideshow Script problem in IE



Guitarmike
12-11-2005, 02:55 AM
Drop-in Slideshow Script
http://www.dynamicdrive.com/dynamicindex14/dropitslide.htm

When viewed on Opera or Firefox images seem to work fine, but in IE they are cut in half and moved to the right.
Here is the page I am working on;
http://guitarmike.com

ddadmin
12-11-2005, 12:50 PM
The problem is the center tag that surrounds the script. Anyhow, to fix this problem, simply add in explicit "left: 0; top: 0" declarations inside the two absolutely positioned DIVs of the script. In other words, modify the code:


if (ie4||dom)
document.write('<div style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hidden"><div id="canvas0" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:-'+slideshow_height+'"></div><div id="canvas1" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:-'+slideshow_height+'"></div></div>')
else
document.write('<img name="defaultslide" src="'+dropimages[0]+'">')

to:


if (ie4||dom)
document.write('<div style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hidden"><div id="canvas0" style="position:absolute;left:0; top:0;width:'+slideshow_width+';height:'+slideshow_height+';top:-'+slideshow_height+'"></div><div id="canvas1" style="position:absolute;left:0; top: 0; width:'+slideshow_width+';height:'+slideshow_height+';top:-'+slideshow_height+'"></div></div>')
else
document.write('<img name="defaultslide" src="'+dropimages[0]+'">')

Guitarmike
12-11-2005, 01:49 PM
Wow, that fixed it right up! Thank you so much. :)