Turn's out the old adage - you learn more from your failures than you do from your successes - is true in this case. I decided to go after this problem using the case I found in the archives that I hadn't been able to solve, as it turns out, a much simpler example. By simply removing the doctype declaration, I was able to fix it. The trouble is that with a doctype of:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
and I am sure, many others, the width calculated by the script for Mozilla based browsers is wrong. So, you can either remove your doctype from the page or, find this line in the script:
Code:
actualwidth=document.all? cross_scroll.offsetWidth : document.getElementById("temp").offsetWidth
and change it to:
Code:
actualwidth=document.all? cross_scroll.offsetWidth : number
substitute for number the actual width of the gallery's train of images, use the number only - no px after it, no quotes around it. Ex:
Code:
actualwidth=document.all? cross_scroll.offsetWidth : 1850
You can find this number by adding together the display width of all the images plus the width of any padding and/or spacing. OR, just temporarily, insert this line just below that line in the unaltered script:view the page in IE and use the value shown in the alert box.
Bookmarks