开发者

Why is the image not showing in IE7?

开发者 https://www.devze.com 2022-12-28 17:15 出处:网络
I have an image on this page in the blue bar area. It shows up fine in FF, Safari, IE8 & Chrome, but it does not show up 开发者_开发技巧in IE7.

I have an image on this page in the blue bar area. It shows up fine in FF, Safari, IE8 & Chrome, but it does not show up 开发者_开发技巧in IE7.

Here is the HTML:

<div id="featuredImage">
  <img src="images/website_design_charlotte.jpg" width="960" height="159" alt="" />
</div>

Here is the CSS:

#featuredImage   { position: absolute; z-index: 9; top: 129px; left: 0; }
#featuredImage img   { width: 986px; height: 159px; position: relative; z-index: 10; }

Would appreciate some help getting this to show up properly in IE7.

Thanks!


A few lines down in your HTML you have this:

<!--[if IE]>
    <link rel="stylesheet" type="text/css" href="styles/style-ie.css" />
<![endif]-->

... which means all the other browsers are using Water.css for the stylesheet, but IE is using style-ie.css. Since you say it is working for IE8, the problem may be in your code that determines the browser version.


I ran into the same issue while working with image material from a client. I received about 10 images, of which all worked fine but two, and I could not figure out why IE was behaving like that (didn't show a 404 or anything).

Turns out the two misbehaving images were saved with CMYK colors, where the others were RGB. Converted them in Photoshop, bang, works.

So if anyone runs into this issue, you might just try that. Idiot clients, idiot IE.


I fixed this problem by replacing an JPG image with PNG format

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号