图像无法在IE中工作的Href

时间:2012-04-17 15:01:30

标签: image html hyperlink internet-explorer-9

没有为类似问题列出解决方案:image inside href link not working in ie7

我的图片链接在ie9中不起作用,但在Firefox&铬。 我知道问题是ie对嵌套div的方法。当我删除它时,链接工作,但我想让它标准化图像所在的框。

<a href='http://www.weflect.com/obj_photos.php?obj_name=Christopher+Nolan&obj_id=1000003100634240'>
   <div class='img_m2'>
      <img class='size_m2' alt='Christopher Nolan' src='http://s3.amazonaws.com/weflect-objects/1000003100634240-f741bdae22811aa18cb2b22eb395d404-35323-m2.jpg'/>
   </div>
</a>

可以查看实时网站:http://www.weflect.com/object/Christopher+Nolan/1000003100634240//

此外,通过在div中放置'a href'来交换订单不是一个选项,因为我希望能够为同一图像设置不同的链接位置。我可以解决它将链接url传递给obj_img函数,但不愿意。这个问题还有其他答案吗?

1 个答案:

答案 0 :(得分:0)

   <div class='img_m2'>
<a href='http://www.weflect.com/obj_photos.php?obj_name=Christopher+Nolan&obj_id=1000003100634240'>
      <img class='size_m2' alt='Christopher Nolan' src='http://s3.amazonaws.com/weflect-objects/1000003100634240-f741bdae22811aa18cb2b22eb395d404-35323-m2.jpg'/>
</a>
   </div>