Image Title Question

4 posts by 3 authors in: Forums > CMS Builder
Last Post: November 10, 2008   (RSS)

I'd like to know if there is a way to not the the <br /> show up when the pointer is held over a thumbnail image. Below is the code that displays the thumbnails. The <br /> is in the title so the info1 and info2 fields show up on separate lines in the Lightbox display.

<a href="<?php echo $upload['urlPath'] ?>" rel="lightbox[<?php echo $incidents_newsRecord['num'] ?>]" title="Photo By: <?php echo $upload['info1'] ?><br /> Description: <?php echo $upload['info2'] ?>">
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="100" height="75" alt="" /></a>

Any ideas? I'm sure there must be a way to concatenate the title string so it does not show up, but maybe there isn't either.

Thanks.

Re: [pcolvin] Image Title Question

Hi, Pcolvin -

Unfortunately there is no simple answer. Text formatting within ALT and TITLE atributes is not supported across all browsers. Under normal circumstances there are only two options:

1) Use "hard returns" in your code...

[font "Verdana"] [font "Verdana"]<a href="<?php echo $upload['urlPath'] ?>" rel="lightbox[<?php echo $incidents_newsRecord['num'] ?>]" title="Photo By: <?php echo $upload ['info1'] ?>
[font "Verdana"] Description: <?php echo $upload['info2'] ?>
Info: <?php echo $upload['info3'] ?>
Etc: <?php echo $upload['info4'] ?>
[font "Verdana"]">
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="100" height="75" alt="" /></a>



[font "Verdana"]...which may be rendered correctly across some browsers.


2) Use DHTML (or even Flash) to create "pop-up/tool-tip" boxes.

I'm not sure if either of these sollutuions is suitable for Lightbox but it's certainly the way to go for normally HTML.

:0)

Perch

Re: [pcolvin] Image Title Question

By Dave - November 10, 2008

And the best way to experiment and find the answer is in a plain .html file. If you can get a simple html file displaying like you need it's much easier to replicate that with the CMS after.
Dave Edis - Senior Developer
interactivetools.com