PDA

View Full Version : Caption styles for Lightbox image viewer 2.03a



dculture
11-22-2011, 07:23 AM
1) Script Title: Lightbox image viewer 2.03a

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

3) Describe problem:
I would like to change the font/color of the caption text. What file is that in? I searched lightbox.css, but couldn't find it.

jscheuer1
11-22-2011, 10:57 AM
It's not in there. But you can put it in there. The id of the caption is 'caption' and the id of the Image x of x (used when there is a Lightbox group) is 'numberDisplay'. They're both spans if that's important to you. So for instance you could have:


#caption, #numberDisplay {
font-family: 'comic sans ms';
color: red;
}

If you're using the link option for the caption, it's selector would be #caption a, so you could do like:


#caption a {
text-decoration: none;
}

Note: This is for Lightbox v2.03a and might not be applicable to other versions. You can always use a DOM inspector to find the selectors for other versions.

dculture
11-22-2011, 07:10 PM
Thanks. I'm still curious to know if the font style is set in a file or if the script demo is just defaulting to a font. I tried the #caption... css code you gave and the text is always reading bold even though I've set the weight to normal. The font style is working fine, but the weight is not, wondering if code somewhere is overriding it.

jscheuer1
11-22-2011, 09:20 PM
Could be. You can aways use the !important keyword. That will override anything scripted, ex:


#caption, #numberDisplay {
font-family: 'comic sans ms';
font-weight: normal !important;
color: red;
}

If you want more help:

Please post a link to a page on your site that contains the problematic code so we can check it out.

dculture
11-28-2011, 05:31 AM
Thanks! That did the trick!