Results 1 to 5 of 5

Thread: Simple Controls Gallery v1.3 Transparent Background

  1. #1
    Join Date
    Nov 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Simple Controls Gallery v1.3 Transparent Background

    1) Script Title: Simple Controls Gallery v1.3

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

    3) Describe problem: Is there any way to make the Gallery background transparent? So that I can make a portrait gallery and have occasional landscape images as .gif files with transparent top and bottom and the page background will show through.

    Or, at a pinch, have a coloured background other than Black.

    Thanks for a great script.

    C.
    Last edited by jscheuer1; 11-12-2009 at 04:03 PM. Reason: fix broken link

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Add this to your style section:

    Code:
    #simplegallery1, #simplegallery1 .gallerylayer {
     background-color: transparent!important;
    }
    where simplegallery1 is the wrapperid for that gallery. But I think using a solid color will be better, otherwise transparent image sections may bleed through to other images in the gallery. One can set the background to be an image though, say your page has a background image, you could use the same one and use the background-position style property to (hopefully) get it to line up with the page's background image.

    In any case, don't forget to use the !important keyword as shown. This is required to override script assigned styles.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Nov 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi

    Works great in FireFox but in IE 8 it has the word 'null' in the top left corner of the images with some transparency.

    Should that be?

    SC

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well, that sort of thing has come up before with some of the scripts written by DD during a certain period where the author got 'null happy'. I think in this case it's due to this line in the main script:

    Code:
    setting.gallerylayers[setting.bglayer].innerHTML=null
    Change it to:

    Code:
    setting.gallerylayers[setting.bglayer].innerHTML="";
    and that should take care of it. But you may also have to change this line as well:

    Code:
    setting.descdiv.innerHTML=null
    to:

    Code:
    setting.descdiv.innerHTML="";
    In IE and some other browsers, setting the innerHTML value to the null object, which technically should empty it, via automatic type conversion to a string (innerHTML is non-standard and can be considered either an object or a string), results in the literal string 'null'. This will not mess up other browsers which consider it an object, as the empty string will be converted to the empty object by them.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Nov 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Fixed it...

    Hi

    First one seems to have fixed it.

    Thanks very much.

    SC xxxx

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •