
Originally Posted by
rbridgeman
Apologies for the months-old bump to this thread, however, how would I make the background transparent?
I have a few different sized images and don't want any specific background except for the background that's on the site I'm making it for.
Thanks.
Edit: I'm using version 2.4
You can't do that as easily. You would think at first glance that making the background transparent would simply show whatever is behind the slide show.
However, the slide show proper (not counting the descriptions and and controls, if any) is made up of three divisions of equal size, two of which are absolutely positioned on top of each other, each of which contain the entire array of the images. Both of these are contained in the third division. Most of this is all constructed by the script, so you don't see it in the HTML markup for the page.
The fading effect is achieved by bringing one of the two contained divisions to prominence (higher z-index) and fading it in. After it fades in, the covered one is faded out and has its z-index lowered. It's a little more complicated than that. But that's the basic concept.
If the background is transparent, and the images are of differing sizes (as in your case) and/or have transparent regions that don't match up, there will be bleed through of the faded out image.
You can attempt to set the background to that of the site. If it's a solid color, you can do that as already discussed in this thread, and there's no problem.
I suspect though that your site's background is more complex, involving at least a background image.
If that's the case, you can set the same background image in the css for these three divisions that I've been mentioning. But unless your overall layout for the page and for the slide show stay in sync at various window sizes, it will be impossible to line up exactly for all possible window sizes.
Also, if the background for the site is even more complex than just a background-image, it can get even more complex or even impossible.
On the bright side, if it's just a background image, and one that will mesh well with itself regardless of its orientation, things are fairly simple.
So, what do you have as the site background?
In any case, for a background image you can do (in your stylesheet):
Code:
#fadeshow1, #fadeshow1 .gallerylayer {
background: white url(background.jpg) 50px 25px !important;
}
where fadeshow1 is the wrapperid for the show, background.jpg is the image (include its path there too if different than the page's), 50px is the left offset for the background and 25px is the top offset. Use these last two items to get it to line up with the existing site background if possible.
As I say there are situations where this will be nearly if not entirely impossible.
There are other slide shows that fade that will not have this degree of difficulty in using a transparent background.
If you want more help:
Please post a link to a page on your site that contains the problematic code so we can check it out.
Bookmarks