PDA

View Full Version : Ultimate Fade-in slideshow - how to change border color



mitja
08-07-2009, 03:04 PM
1) Script Title: Ultimate Fade-in slideshow (v1.51)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm

3) Describe problem:

I saw that I can add a border with "borderwidth:" but the border is black. How can I change the color from black in something diferent?

TIA
Mitja

mitja
08-10-2009, 09:25 AM
No answers?

Beverleyh
08-10-2009, 12:37 PM
You could try setting the borderwidth to 0 and then placing the javascript call to the gallery inside a div with the border property set to whatever you want, like so:


<div style="border:1px solid red">
<script type="text/javascript">
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 140, 225, 0, 3000, 1, "R")
</script>
</div>

You can use a hexidecimal value instead of "red", such as:
<div style="border:1px solid #990099">
(#990099 gives a dark purple border)

syrehn
08-10-2009, 08:54 PM
I'm also having the same problem the solution provided doesn't work for me. my slide shows are in a table with the images centered and smaller than the table, doing that puts a red box around the table cell not the actual image itself.

any other suggestions?

syrehn
08-18-2009, 03:43 PM
*bump

anyone??

Beverleyh
08-20-2009, 11:11 AM
Do you mean that the javascript call is inside a table cell?

It sounds like you're putting the containing div outside of the table tags which would give the border on the outside of the table.

Make sure the containing div is inside the cell that contains the javascript like this:

<table border="0">
<tr>
<td align="center">
<div style="border:1px solid red">
<script type="text/javascript">
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 140, 225, 0, 3000, 1, "R")
</script>
</div>
</td>
</tr>
</table>

If this isnt what you meant, please paste your code or provide a link.

syrehn
08-21-2009, 04:28 PM
Thank you Beverleyh for your help! I was making the mistake of putting the div outside the table tags like u said. DOH!
I also needed the div to be a certain width as well, so if you want to have it fit a specific size it has to be like:


<td height="93" align="center"><div style="width:220px; border:3px solid #0FF"><script type="text/javascript">
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages2, 220, 100, 0, 4000, 0)
</script></div></td>

or if you would prefer to style it in css. assign an id and have something like this in your css page (if you want to apply your div style to multiple objects on the page like i did make it a class not an id):

#display {
border: 3px solid #FFFFFF;
width: 220px;
}

call it in your html with the script like this:


<td height="93" align="center"><div id="display"><script type="text/javascript">
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages2, 220, 100, 0, 4000, 0)
</script></div></td>