Results 1 to 9 of 9

Thread: lightbox2 caption color

  1. #1
    Join Date
    Jul 2006
    Location
    Monmouth county, NJ
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default lightbox2 caption color

    1) Script Title: Lightbox image viewer 2.0

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

    3) Describe problem:
    I would like to have the color of the image captions be different than the color of the text on the main page. There will be several pages so I prefer not to format the font color inline on all the pages. What is the best way to do this?

    My page is at:

    http://phcdesigns.com/galleryPage/test1.html

    I thought the linked style sheet (lightbox.css) would controll the gallery while the embedded style would override the .css to controll the page text color but I havent gotten this to work. Obviously I'm a beginner, please be nice to me.

    Thank you,
    Bob (caipirinha)

  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 selector and rule set to your lightbox.css stylesheet:

    Code:
    #caption, #numberDisplay {
    color:black;
    }
    - John
    ________________________

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

  3. #3
    Join Date
    Mar 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi,
    I have tried this :
    Quote Originally Posted by jscheuer1 View Post
    Add this selector and rule set to your lightbox.css stylesheet:

    Code:
    #caption, #numberDisplay {
    color:black;
    }
    I have also tried :
    Code:
    #imagedata #caption {
    font-weight: bold;
    color:black;
    }
    but neither show the caption for me. My website background is black with white font. Does this need to be placed at the end of the script or doesn't it matter where it appears in lightbox.css ? Your help appreciated.

  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

    Neither is designed to show any caption, just to affect its style. There will be no caption if the link with the attribute rel="lightbox" has no attribute title, ex:

    Code:
    <a href="larger.jpg" rel="lightbox" title="Nice Image"><img src="smaller.jpg"></a>
    Last edited by jscheuer1; 03-16-2007 at 01:41 AM. Reason: typo
    - John
    ________________________

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

  5. #5
    Join Date
    Mar 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    True - which is why my html script has
    Code:
    <a rel="lightbox[page2]" title="my caption of photo" href="images/demo_102.jpg">
    <span style="text-decoration: none"><img border="0" src="images/demo_102.jpg" width="100" height="64" ></span></a>
    The title can be seen in the hint text of the thumbnail but not when the light box opens - possibly because the colour needs to be changed (as I mentioned in my first post the main website is black background with white font)

    Is it supported in lightbox version 2 ?

  6. #6
    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's the way to do it. There must be some mistake or other circumstance preventing this from working for you then. A link to your problem page would let me see if I can advise you further.
    - John
    ________________________

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

  7. #7
    Join Date
    Mar 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    cheers John - that would be great.

    There are a few pages - but one of them is
    http://www.sindo.org/Photo%20Gallery%20Page%202.htm

    Many thanks

  8. #8
    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

    Are you a Brit? Not that there is anything wrong with that but, you have:

    Code:
    #caption, #numberDisplay { colour: black; }
    It should be:

    Code:
    #caption, #numberDisplay { color: black; }
    In a completely unrelated matter, you should use actual thumbnail images for thumbnails instead of relying upon the browser to scale down the larger ones. This will save time when loading the page, very important for all but the fastest connections.
    - John
    ________________________

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

  9. #9
    Join Date
    Mar 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    LOL !!!! Well spotted !! Oh I do beg your pardon and I am awfully sorry for wasting your time correcting my English typos.....

    Seriously - the caption works great now.

    Thanks also for your tip on the thumbnails. I think my other pages use thumbnails but this one slipped through the net.....

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
  •