I have a gallery of my paintings at www.unlicensedeyesurgery.com which uses the famous Lightbox code. There is one problem with it: the Lightbox code uses the rel
attribute of the anchor tag to display the description of the image in the pop-up "window." However, this somehow overrides the images' alt
property and shows the ugly, HTML-code description in the mouse tooltip. Is there a way to disable to tooltip altogether—perhaps using JS?
Code Example:
<a href="#" rel="<em>lightbox html<span>styled</span> text in here<em>">
<img src="photo.jpg" alt="this is overwritten" />
</a>
Your title overrided by
<a title="....">
as you have here image set it's title to alt contentyou can do it with javascript:
The problem is the anchors rel is getting precedence over the images alt tag in the tooltip.
The solution is to add a title:
title="photo title"
to all your img tags and browsers will show that instead of the anchor's rel.