开发者

.png images display in IE8 alone but not inside a page

It's been a while since I did serious web development. Now I meet a host of brand new problems I'm no longer familiar with..

I have some .png images for various icons in my web page. What I find is that whenever I edit these images, they stop working inside a page in IE8. That is, they (usually) display OK when I first open the page, then are replaced by the placeholder icon on refresh. Sometimes, some of the icons display and others, with the same src, don't.

My 开发者_如何学Pythonimage tags are nothing fancy, typically:

<img src="images/misc/smallreport.png" alt="Report" />

When I right-click an icon in the page and select "properties", protocol, type, address and size are shown as "Not Available", and dimensions are incorrect (size of the placeholder, I bet).

If I open the images directly in IE (ie. not within the page), they work just fine.

I have used Paint.NET to edit the images, but have also tried saving them with Paint.

Right now, I am working right off the hard disk (ie. not through a web server). And, oh yes, none of this happens in Google Chrome.

What's going on here?


check the path to the file is correct - can we see the tag please.


Well, we learn something new every day..

I mentioned that I'm running this directly off the harddisk? Now, it turns out the html page (which I had gotten off a coworker) was blocked "to help protect my computer", as Windows does.

This is no big surprise, lots of files I'm working with originate on other computers, and I usually don't worry much about it (except with executables, which won't run until unblocked).

It seems, however, that when IE8 loads such a blocked HTML file, its security settings adjust somehow, and - well, I can only guess at the details, but as soon as I right-clicked the HTML file, selected Properties and clicked the "unblock" button, the problem went away.


Something similar happened to me once, I tried hard to find what was wrong, then I realized I was saving (from Photoshop) the file as PSD but with extension .png. Make sure you're not doing the same.

Also:

  • Clear temporary Internet files
  • Verify that the Show Pictures option has not been turned off
  • Make sure that the Toggle Images.exe Web accessory is not present and disabling images
  • Make sure that a third-party Internet security, firewall, or cookie-blocking program is not causing the problem
  • Enable the Auto-Select encoding option

Source


It might be that the website you have browse has a lack of support for an IE browser. IE is a nightmare for all web developers & Web designers. It might be the developer of that website didn't care for an IE display because of IE issues. Perhaps IE is trying to create a web standard to increase their sales and marketing strategy. That's why don't care the modern Web development standard. Why Chrome or Firefox or Safari, it's a free anyway.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜