Help - Search - Members - Calendar
Full Version: PNG Transparency in IE 5 & 6
Forums > Resource Center > Webmasters' Corner > Webmasters' Corner Resolved Topics
cikayelle
I had been working on a heavily-reliant-on-transparent-PNGs MySpace layout for about a couple hours each day of a week now, and come time to do browser testing, I find that IE cannot render my PNGs correctly. Thus, the entire layout is just the topmost layer and gray all over. I've been searching for some sort of hack to override this, but all I can find are Javascript and PHP solutions, and the "help" Microsoft offers makes the images entirely transparent. Any suggestions at all would be appreciated.
SinfullySweet
Why don't you just upgrade to internet exlorer seven? There is no need for overrides. I think everyone basically uses version 7 now _smile.gif

http://www.microsoft.com/windows/products/...ie/default.mspx
cikayelle
If you would refer to the most recent dates on this page, it shows the number of people who use IE 6 nearly double the number who use IE 7. While statistics should be used cautiously, I have checked many sources, all which seem to indicate at the very least that more people use IE 6 then 7.

As for myself, I use Firefox -- no need to upgrade to 7. I keep 6 around to do browser testing, because that's the version that most of my friends use. Thanks for the suggestion, though :).
tripvertigo
i dont use 7. just because you think people probably dont use a certain browser is no excuse not to have cross browser portability.

http://www.twinhelix.com/css/iepngfix/

here. i use this all the time. download the zip archive on that page.

since it's on myspace, you'll need to do the following:


Upload blank.gif to a webserver.
Open iepngfix.htc in notepad.
Find this:

QUOTE
// This must be a path to a blank image. That's all the configuration you need.
if (typeof blankImg == 'undefined') var blankImg = 'blank.gif';


change "blank.gif" to "http://yoururlhere.com/blank.gif" (wherever you uploaded blank.gif to).

Save iepngfix.htc and upload it to a server.

Put this in your myspace css:



CODE
<style type="text/css">

img {
   behavior: url("http://yoururlhere.com/pngbehavior.htc");
}

</style>


replace yoururlhere.com with wherever you uploaded the file.

That SHOULD work.
cikayelle
Thank you very much. Trying it out right now.
cikayelle
It's not working. I've tried everything I could think of for the past hour. When I first load the page, the script works for a milisecond before the PNG images revert back to gray. I'll keep trying, but if there are any other fixes out there...
tripvertigo
link
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.