View Full Version : Ultimate Fade-in slideshow (v2.1) Horizontal off center.

04-13-2010, 07:49 PM
1) Script Title: fadeslideshow.js

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeslideshow.js

3) Describe problem: Image display off center horizontal when fader div widther then image.

I found on line 138 fadeslideshow.js this code
$slideimage.css({marginLeft: (imgdimensions[0]>0 && imgdimensions[0]<setting.dimensions[0])? setting.dimensions[0]/2-imgdimensions[0]/2 : 0})

When i change the divider in code from 2 to 3 the image gets cloase to center.
$slideimage.css({marginLeft: (imgdimensions[0]>0 && imgdimensions[0]<setting.dimensions[0])? setting.dimensions[0]/3-imgdimensions[0]/2 : 0})

How do i fix the code to find true horizontal center. :confused:
Vertical center is fine even when fader div is larger then displayed image :)

Btw. Cool script :rolleyes: