Results 1 to 3 of 3

Thread: Drop-in Slideshow Script problem in IE

  1. #1
    Join Date
    Dec 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Drop-in Slideshow Script problem in IE

    Drop-in Slideshow Script
    http://www.dynamicdrive.com/dynamici...ropitslide.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

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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:

    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:

    Code:
    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]+'">')

  3. #3
    Join Date
    Dec 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Wow, that fixed it right up! Thank you so much.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •