PDA

View Full Version : lightbox2 caption color



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

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex4/lightbox2/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)

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


#caption, #numberDisplay {
color:black;
}

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

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


#caption, #numberDisplay {
color:black;
}

I have also tried :

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

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

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

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

sindo
03-16-2007, 07:07 AM
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

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

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