View Full Version : Swiss Army image slideshow background

10-07-2009, 03:45 PM
1) Script Title: Swiss Army image slideshow

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/swissarmy/index.htm

3) Describe problem: I'm using the script to display images of varying sizes with automatic fade effect and control buttons (the first example). I know that the maximum length and width of the images can be specified with a fading background colour, but is there a way I can use my webpage background for the slideshow so that my images just appear on a consistent, unbroken background? Or is this not possible? Any advice gratefully received, thanks!

10-07-2009, 04:27 PM
It's possible but can be a little tricky. The slides need some background (solid color or image) otherwise the result - particularly with various different sized images - will not be pretty. That said, a css style selector for where that background is applied would be (for the first slide show on a page, increment 0 for each subsequent show, if any):

#master0 div

so you could put this in your stylsheet:

#master0 div {
background: url(whatever.gif)!important;

and it will override what the script is placing as the background on these divisions which hold the slides. However, even if you use the same image as is used for the background of the page, chances are it won't line up with the page's background. If your page's background image is at all complex, this will probably look odd. But you can use the css background's property positioning values to get it to line up, assuming your layout is fixed enough to allow for this.

For more info on how that works see:


or your favorite css reference.

10-07-2009, 06:08 PM
Thanks very much - I'll experiment a bit more!

10-07-2009, 09:41 PM
You're welcome. If you get close, or even far to what you are shooting for and run into problems, post a link to your best effort here in this thread, and I'll see what can be done.

However, as I mentioned, if your layout is too fluid (fluid layouts are generally a good thing - so don't feel bad if it is), exactly lining up a complex background in the manner I described in my previous post may just not be possible. But some acceptable compromise probably can still be obtained.