各位同仁,最近项目中遇到兼容的问题很让人痛疼,IE7,IE8 Forfox 都要兼容,CSS调式带来了很大的困惑
下面是一段HTML 代码

问题在IE7下点击连接没有任何反应 div A 连接生效
这段代码在IE8和Forfox 都是没有问题的.
这一段HTML 代码保存到数据库当中:数据量很多,最好不要直接在上面做修改
请高手指点....感激不尽..谢谢.

<html>
<head>
<style type="text/css">
div.img
  {
  margin:2px;
  border:1px solid #0000ff;
  height:500;
  width:500;
  float:left;
  text-align:center;
  }
div.img img
  {
  display:inline;
  margin:3px;
  border:1px solid #ffffff;
  }
div.img a:hover img
  {
  border:1px solid #0000ff;
  }
div.desc
  {
  text-align:center;
  font-weight:normal;
  width:120px;
  margin:2px;
  }
div.inner{
height:200;
width:160;
border:1px solid #0000ff;

}
</style>
 
</head>
<body><div class="img" >
  <a target="_blank" href="http://www.w3school.com.cn/index.html" >
   <div class="inner" id="A">
  <img src="klematis_small.jpg" alt="Klematis" width="110" height="90" src="http://www.w3school.com.cn/index.html"/>
</div>
  </a>
  <div class="desc">Add a description of the image here</div>
</div>
 </body>
</html> 

解决方案 »

  1.   

    <img src="klematis_small.jpg" alt="Klematis" width="110" height="90" src="http://www.w3school.com.cn/index.html"/>
      

  2.   

    也可以直接在直接修改这段HTML 这要能解决这个问题就可以了
      

  3.   

    你想要的是什么效果啊!在Firefox中式居左对齐,在IE7是居中显示的。肯定是嵌套定义的原因。
      

  4.   

    IE7不行的话,你在<head>里加一句
    <meta http-equiv="x-ua-compatible" content="ie=7" />看看行不行!
      

  5.   

    我试了一下不可以
    下图是要求的效果,点击图片区域(图中1的区域)和点击外层区域(图中2的区域) 都可以弹出一个连接出来
    现在是IE8 和 Forfox 可以工作, IE7 下点击图片区域([color=#FF6600]图中1的区域)不能弹出
    点击外层区域可以弹出[/color]
      

  6.   

    在IE8和FF下弹出的是外层的链接,你要的是这个效果吗?如果是我可以给你改。
      

  7.   

    1.最终效果是:IE7,IE8 和Forfox 点击图像或点击外层连接都可以弹出连接
    2.现在是IE8和Forfox 没有问题,只有在IE7上点击图片连接没有任何反应,点击外层连接是可以的..
      

  8.   

    把<a>元素设置成display:block - instead of div