简体   繁体   English

图像未出现在IE7或IE8中

[英]image not appearing in IE7 OR IE8

I have an image that is using absolute positioning on my site. 我的图片在我的网站上使用绝对定位。 It is positioned to appear over a css-background-image. 它的位置使其显示在css背景图像上。 It works fine in gecko based browsers and webkit. 它在基于壁虎的浏览器和Webkit中运行良好。 I was surprised to see the same problem in BOTH versions of IE including 8. I am currently using a png for the image but tried it with a jpg and that made no difference. 我很惊讶地在包括8在内的IE的两个版本中看到相同的问题。我当前正在使用png作为图像,但是尝试了jpg,这没有什么区别。 Relevant markup and css below....Any ideas ? 下面的相关标记和CSS。...有什么想法吗?

     <div id="have_vid">
     <div id="click_here">
        <a href="/services"<img id="join_now" src="<?php bloginfo('template_directory'); ?>/images/clickhere.png"</img></a>
     </div>
     </div>

#have_vid {
    width: 328px;
    height: 152px;
    background-image: url(images/havevid.jpg);
    background-repeat: no-repeat;
    float: right;
    margin-right: 10px;
    margin-top: 10px;
    padding-bottom: 14px;
    border-bottom:1px dotted #616161;
}

#click_here{
    position: absolute;
    top: 50px;
    right: 24px;
}

Your 'A' element is wrong. 您的“ A”元素有误。 Try 尝试

<a href="/services"><img id="join_now" src="<?php bloginfo('template_directory'); ?>/images/clickhere.png" /></a>

Also use fiddler to watch and see that IE is downloading the image correctly. 还可以使用提琴手观看并查看IE是否正确下载了图像。

You're missing a closing angle on your <a> tag: 您在<a>标签上缺少闭合角:

 <a href="/services"<img id="join_now" src="<?php bloginfo('template_directory'); ?>/images/clickhere.png"</img></a>

Should be: 应该:

 <a href="/services"><img id="join_now" src="<?php bloginfo('template_directory'); ?>/images/clickhere.png"</img></a>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM