Hello Everyone, can you please give me the solutions for PNG Fix solutions in IE6 for window XP? waiting your response...
Hi, Insert code below in your page, and put the attached file in your site. <head> <!--[if lt IE 7]> <script type="text/javascript" src="unitpngfix/unitpngfix.js"></script> <![endif]--> </head>
I would say change the .png to a .gif and select a nice matte for the new transparent .gif. IE6 doesn't like png files. Or you could do what m7md has suggested.
Actually, IE6 has no problem with .png files if you don't use ALPHA transparency and strip the GAMA line using a program like tweakpng to fix the color matching issues. 8 bit .png using palette transparency is identical to .gif except that for images of more than 16 colors .png usually results in smaller files. Though 99.99% of the time someone is asking for PNG to work in IE they're talking alpha transparency, which most always means fat bloated needlessly large images in the first place... in which case pre-composite your effects and use flat .png, or if you need to have it on a patterned background use "close enough" aliasing or other techniques... Beats the tar out of bloating out the markup with IE conditional nonsense and delaying the page-load and increasing browser overhead (often making scrolling painful) with javascript. I'd have to see the page/images in question, but I am 99.99% certain you don't need any sort of 'fixes', you just need to re-evaluate how you are putting the images and effects together.
The coolest fix for PNG transparency in IE6 is to give a link on your home page to your visitor and say! "Enough of this IE6 Bulls*t, now please switch to Firefox or Chrome, right now!!"
Oh yes, because a return to the "best viewed in" nonsense of the 1990's is SUCH a good idea... especially when many people have no choice in the workplace when they are tied to business crapplets or outdated intranet technologies that don't work at all in IE7/newer, much less alternative browsers. Besides, it's hard to overcome the "It's worked just fine for me for ten years, why do I need something newer" mentality of the average suit, who doesn't know and doesn't care about things like browser standards - if they did, 90%+ of the people developing websites would be out of a job.
Sorry I didn't make that clear about using transparencies. The problem that I have with the png files is the alpha transparency in ie6. There's some instances when designing some graphics that you want to place it on a background but don't want the image that is placed on top to show its background.
I thikn you may use this: <!--[if IE 6]> <p>Hello guest. You are using <b>Internet Explorer 6</b> or an older version.<br>You may use <a href="http://www.microsoft.com/turkiye/windows/ie/default.mspx"><b>Internet Explorer 7</b></a> or <a href="http://www.mozilla-europe.org/tr/products/firefox/"><b>firefox</b></a></p> <![endif]--> Code (markup):
Here is something I've used for a site I created some time back. It's short and fast loading, but like most tranparent png fixes, relies on browser scripting. Unfortunately, I don't recall who the original author was. Create an IE6 only stylesheet and paste the following code: * html .png{ /*position:relative;*/ /*removed due to layout problems*/ behavior: expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none", this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')", this.src = "blank.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''), this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='crop')", this.runtimeStyle.backgroundImage = "none")),this.pngSet=true) ); } Code (markup): Then assign a class of png to any image you want it to apply to. You will also need to keep a copy of the attached blank.gif file in the root directory. Otherwise IE will display the ugly red "image not found" X. Note: clearly this stylesheet will not validate, but should not be a big deal since it will be hidden from most browsers.
I used this http://www.twinhelix.com/css/iepngfix/demo/ and it worked like a charm for me, just follow the instructions and good luck