Topic: Transparent Background with Showkase iframe embed

Hi there,

I have a Showkase Juicebox gallery embedded into an existing website with an Iframe.

Where/ how do I remove the background of the gallery. I have attempted to this with various suggestions found on the web within the iframe code, but nothing is working. Should it be in within the iframe code on my html page or is in the CSS or the customize gallery bit?

Thanks

Re: Transparent Background with Showkase iframe embed

First of all, you will need to set the gallery's 'Gallery background color opacity' to 0 (to set the background to be fully transparent) in the Juicebox page's 'Gallery Lite Options' section.

Then, for Internet Explorer, you may also need to use the allowtransparency="true" attribute in your iframe as follows:

<iframe src="/showkase/gallery/index.html" width="800" height="600" allowtransparency="true" frameborder="0" scrolling="no"></iframe>

Re: Transparent Background with Showkase iframe embed

I already have the 'gallery background opacity' set to 0 and have the 'allowtransparency="true" command, but I still have a semi transparent black background. I'm using a Pro viewer, does this make any difference?

Re: Transparent Background with Showkase iframe embed

I'm using a Pro viewer, does this make any difference?

No, setting a gallery's background to be transparent is the same for both Juicebox-Lite and Juicebox-Pro.
Please post the URL to the web page containing your iframe so that I can take a look and investigate further. Thank you.

Re: Transparent Background with Showkase iframe embed

http://boxofbirds.kiwi.nz/shoptour.html

thanks so much

Re: Transparent Background with Showkase iframe embed

Thank you for providing the URL to your web page. I now see the problem.
Your gallery does have a transparent background but the background color of the page that the gallery is embedded into (the Showkase page that you load into your iframe) has a background color of #222222.
You will need to make the background of the Showkase gallery page transparent, too.

Open the '_themes/manager/css/custom.css' file in a plain text editor and add the following code:

body, html {
    background-color: transparent !important;
}

Alternatively, instead of using an iframe, you could embed the gallery directly into your web page using the baseUrl method as documented here (and set the gallery's background to be transparent in the embedding code).

Just replace your iframe code with the following:

<!--START JUICEBOX EMBED-->
<script src="/showkase/gallery/jbcore/juicebox.js"></script>
<script>
  new juicebox({
    baseUrl : '/showkase/gallery/',
    containerId : 'juicebox-container',
    galleryWidth : '100%',
    galleryHeight : '800',
    backgroundColor: 'rgba(0,0,0,0)'
  });
  </script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->

This has none of the drawbacks that using an iframe has (please see here for details) and avoids the need to add any custom CSS to your Showkase pages.

Re: Transparent Background with Showkase iframe embed

I would like to use the baseURl method but it doesn't seem to work. (no gallery visible) Should I need to adjust anything in the code? Wondering if there is a  javascript conflict with other scripts I have. Anyway, I have tried your first option with the iframe and it has resolved the transparency problem. thanks!

Re: Transparent Background with Showkase iframe embed

Anyway, I have tried your first option with the iframe and it has resolved the transparency problem. thanks!

That's great! Thank you for letting me know.

I would like to use the baseURl method but it doesn't seem to work. (no gallery visible)


Sorry, my mistake. The baseUrl method should work fine. Juicebox galleries within Showkase share a common 'jbcore' folder so the path to your 'jbcore' folder was incorrect in my code above.
Please try the following code:

<!--START JUICEBOX EMBED-->
<script src="/showkase/_viewers/juicebox/jbcore/juicebox.js"></script>
<script>
  new juicebox({
    baseUrl : '/showkase/gallery/',
    containerId : 'juicebox-container',
    galleryWidth : '100%',
    galleryHeight : '800',
    backgroundColor: 'rgba(0,0,0,0)'
  });
  </script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->

Re: Transparent Background with Showkase iframe embed

I just figured that out as you replied, except I had used this address:

"http://www.boxofbirds.kiwi.nz/showkase/ … uicebox.js"

Re: Transparent Background with Showkase iframe embed

The first one I tried worked but i've now swapped to the address you suggested which also works. The only problem is that the social and navigation icons are not displaying now.

Re: Transparent Background with Showkase iframe embed

The first one I tried worked but i've now swapped to the address you suggested which also works.

If you hardcode the 'www' subdomain in the path, then your gallery might work only when visitors go to www.boxofbirds.kiwi.nz and not boxofbirds.kiwi.nz. The code I posted (with the leading slash to denote your root directory) should work for both addresses.

The only problem is that the social and navigation icons are not displaying now.

I have just viewed your gallery and the icons seem to display fine.
I'm not sure if you have solved your problem or if you are still experiencing difficulties but if you still cannot see the icons, then try clearing your browser's cache before reloading your web page to see if this helps.

Also, please bear in mind that the icons are characters in a custom font so make sure that you do not have any global CSS rules which might set a font-family for everything on your page and which might override the gallery's own font. It is not possible to isolate a Juicebox gallery (or any other element on a web page) from global CSS rules and Juicebox will have no option but to inherit such rules. If you do find such a global font-family CSS rule, then try applying it to only those elements on your web page which require them through use of ids and classes.
(This is perhaps one good thing about using an iframe: it isolates the gallery from all other code on the web page that it is loaded into.)