View Full Version : lightbox2 caption color

08-08-2006, 05:08 AM
1) Script Title: Lightbox image viewer 2.0

2) Script URL (on DD):

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:


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)

08-08-2006, 05:17 AM
Add this selector and rule set to your lightbox.css stylesheet:

#caption, #numberDisplay {

03-15-2007, 01:30 PM
I have tried this :

Add this selector and rule set to your lightbox.css stylesheet:

#caption, #numberDisplay {

I have also tried :

#imagedata #caption {
font-weight: bold;

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.

03-15-2007, 02:06 PM
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:

<a href="larger.jpg" rel="lightbox" title="Nice Image"><img src="smaller.jpg"></a>

03-15-2007, 11:25 PM
True - which is why my html script has

<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 ?

03-16-2007, 01:44 AM
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.

03-16-2007, 07:07 AM
cheers John - that would be great.

There are a few pages - but one of them is

Many thanks

03-16-2007, 08:03 AM
Are you a Brit? Not that there is anything wrong with that but, you have:

#caption, #numberDisplay { colour: black; }

It should be:

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

03-16-2007, 02:08 PM
LOL !!!! Well spotted !! Oh I do beg your pardon and I am awfully sorry for wasting your time correcting my English typos..... :D

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