Posted by nognielsen on May 12, 2008 at 1:35pm
| Project: | Image Caption |
| Version: | 6.x-2.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | nognielsen |
| Status: | active |
Issue Summary
I love the plugin! However, on IE 7 for some reason I'm not getting expected results. Works fine in Firefox. I link to the original lots of times so that the user can click on the image and go to the larger version. However, In ie 7, only when using the caption, the image has the link and the caption is underlined and appears to be a link, but when you mouse over it, you can't click on it and the cursor does not change to a hand indicating that a user has reached a link. Any ideas? If I take off the caption by not selecting that class the link works fine. Here's the html.
Chris
Works fine if do this
but then of course I don't get the caption. :) Probably something silly. Thanks for any input.

Comments
#1
whoops, here's the html code
<a target="_blank" href="/files/u4/AmandaIMG_2002.jpg" title="Amanda Prom"><img vspace="2" align="right" width="215" src="/files/u4/AmandaIMG_2002_0.jpg" hspace="4" alt="Amanda" height="280" title="Amanda and Her Friend" class="caption" /></a>
<a target="_blank" href="/files/u4/AmandaIMG_2002.jpg" title="Amanda Prom"><img vspace="2" align="right" width="215" src="/files/u4/AmandaIMG_2002_0.jpg" hspace="4" alt="Amanda" height="280" title="Amanda and Her Friend" /></a>
This works but then I don't get the caption.
#2
I suspect your problem is that -
For possibly the first time in History, IE is getting it right.
The client-side annotation wraps the image in a DIV,
This produces something like
ADIV
IMG
/DIV
/A
This is illegal markup, and (IFF you are using XHTML-strict) the browser would be right to disable the link behaviour! ...Although the style rendering may still be in effect in your case :-)
When I did something similar - inspired by image caption - I ended up having to use SPANs to do the wrapping, then
span.image-wrapper {display:block;
}
to re-apply the effect.
#3
@dman: Yes, that makes sense, thanks.
I haven't really tested the idea of having hyperlinked captioned images and they would be 'divs' inside 'a' tags which is probably not good markup.
It would depend a bit on your site's DTD how the browser responds.
regards,
DT
#4
Hi
@davidwhthomas: Are you going to correct this in the next release or could you shortly say how to repair this behaviour ourself to get rid of this? Perhaps via css?
Thank you
#5
I'm about to go on an overseas trip, back in two weeks.
I'm planning on releasing an update that should resolve this issue then.
regards,
DT
#6
Just wanted to ask how your overseas trip was and how far you got in tracking down this issue.
regards,
Tobi
#7
this should be fine now, or else try the D6 version.
#8
Automatically closed -- issue fixed for two weeks with no activity.
#9
I can confirm that image-caption does not create a clickable image link in IE 6.02
Modifying image_caption.js according to the comments above
(this).wrap("<div class=\"image-caption-container\" style=\"float:" + alignment + "\"></div>");to
$(this).wrap("<span class=\"image-caption-container\" style=\"float:" + alignment + "\"></span>");seems to work.
#10
I am posting a fix to the javascript that was not allowing the text to display properly in any version of IE.