Topic: Caption line height (line spacing, leading)

I would like to change the line height for my image captions. I have searched the forums extensively and cannot find a direct response to this question. I would be most grateful if someone could post a sample of code that shows exactly how this is achieved. Thanks in advance.

Re: Caption line height (line spacing, leading)

You can change the caption font size with the captionFontSize Pro Option: http://simpleviewer.net/simpleviewer/pr … ml#caption
You can also use HTML formatting to your captions: http://simpleviewer.net/simpleviewer/su … l#custom_1
... so you can space out your captions with HTML line breaks.

<caption><![CDATA[Line 1<br><br><br>Line 2]]></caption>
Steven Speirs
SimpleViewer Support Team.

Re: Caption line height (line spacing, leading)

Hello Steven,
Thanks for your quick reply. I don't think your suggestions will help in my case. I do not want to change the font size. I'm happy with the way it is. I simply want to change the distance between lines of text within the caption. Furthermore, I don't want to increase the spacing, I want to reduce it, preferably using a fraction of an em height. I look forward to your response.
Thanks again,
Registered

Re: Caption line height (line spacing, leading)

Try the <textformat> tag with a negative value for the 'leading' attribute.

<caption><![CDATA[<textformat leading="-10">Line 1<br><br>Line 2</textformat>]]></caption>

Please note that this is not officially supported but it seems to work.

Steven Speirs
SimpleViewer Support Team.

Re: Caption line height (line spacing, leading)

That did the trick! big_smile

I had to set the leading value to 0 to get what I was after.

The behavior I was trying to overcome was the leading of the caption text was larger than the rest of the html text on the page. I don't understand why the caption would be larger, but by adding the leading value of 0, I was able to match the leading of the rest of the page.

Thanks very much for your help.

Regards,
Registered