View Full Version : CMotion Image Gallery - placement

08-01-2006, 05:53 PM
1) Script Title: CMotion Image Gallery

2) Script URL (on DD): www.cynsheas.com/new

3) Describe problem: I "think" I've specified the placement of the image gallery the way I want it - 100 px from the left side. It shows up that way initially but when you use the cursor to scroll, it moves to a 0 px position.

Thanks in advance for your help.

08-01-2006, 06:20 PM
<td height="200" background="horizontal_bar.jpg"><div id="motioncontainer" style="position:relative;width:700px;height:200px;overflow:hidden; left:100px;">
<div id="motiongallery" style="position:absolute; left:0; top:0px; white-space: nowrap;">
<nobr id="trueContainer"><img src="scroll_images/cafe03.jpg" width="267" height="200" border="1" galleryimg="no">
<img src="scroll_images/cafe04.jpg" width="150" height="200" border="1" galleryimg="no">
<img src="scroll_images/cater14.jpg" width="150" height="200" border="1" galleryimg="no">
<img src="scroll_images/cater09.jpg" width="316" height="200" border="1" galleryimg="no">
<img src="scroll_images/cater10.jpg" width="232" height="200" border="1" galleryimg="no">
<img src="scroll_images/cater13.jpg" width="148" height="200" border="1" galleryimg="no">
<img src="scroll_images/cater05.jpg" width="162" height="200" border="1" galleryimg="no">
<a href="scroll_images/cater07.jpg"><img src="scroll_images/cater07.jpg" width="310" height="200" border="1" galleryimg="no"></a>
<img src="scroll_images/cater02.jpg" width="112" height="200" border="1" galleryimg="no">
<img src="scroll_images/cafe01.jpg" width="267" height="200" border="1" galleryimg="no"></nobr></div>

08-02-2006, 12:47 PM
I appreciate your help. It wasn't obvious to me where the changes were in what you supplied. What was I doing wrong?

08-02-2006, 05:44 PM
You could have just compared my short bit of code to your own. However, as I recall, you were positioning the inner absolutely positioned division which is the one positioned dynamically by the script to achieve the movement effect. You had also given this inner division dimensions, a poor choice as the script normally uses this inner division's child's apparent dimensions as part of its movement engine. Declaring them in the HTML position overrides the scripts ability to do so. Both of these adjustments can be safely made to the outer, relatively positioned division so, that's what I did, moved the dimensions and left adjustment to the outer division.

Additionally, you had introduced another division:

<div align="center">

into the mix. This wasn't doing anything good, and might have been causing a problem.

Finally, you had left one of the images outside of the <nobr> tag. You cannot do that with this script.


Notes: I also added the galleryimg="no" attribute to all of your images in the gallery. This simply prevents the IE image toolbar from displaying. I corrected a semantic error inherited from the demo by adding quotes to the the border values of the images:

border="1" for border=1

That has no effect upon the workings of the script.