Need Solutions for PNG Fix in IE6

Discussion in 'HTML & Website Design' started by designer.ahmedabad, Jan 3, 2010.

  1. #1
    Hello Everyone,

    can you please give me the solutions for PNG Fix solutions in IE6 for window XP?

    waiting your response...
     
    designer.ahmedabad, Jan 3, 2010 IP
  2. corrykid

    corrykid Peon

    Messages:
    60
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What is your problem...
     
    corrykid, Jan 3, 2010 IP
  3. m7md_cis

    m7md_cis Peon

    Messages:
    91
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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>
     

    Attached Files:

    m7md_cis, Jan 4, 2010 IP
  4. xenobiologist

    xenobiologist Active Member

    Messages:
    165
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #4
    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.
     
    xenobiologist, Jan 8, 2010 IP
  5. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #5
    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.
     
    deathshadow, Jan 8, 2010 IP
  6. Oranges

    Oranges Active Member

    Messages:
    2,610
    Likes Received:
    92
    Best Answers:
    0
    Trophy Points:
    90
    #6
    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!!" :D:p
     
    Oranges, Jan 8, 2010 IP
  7. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #7
    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.
     
    deathshadow, Jan 9, 2010 IP
  8. xenobiologist

    xenobiologist Active Member

    Messages:
    165
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #8
    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.
     
    xenobiologist, Jan 9, 2010 IP
  9. K_E_M_O

    K_E_M_O Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    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):
     
    K_E_M_O, Jan 10, 2010 IP
  10. jwitt98

    jwitt98 Peon

    Messages:
    145
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #10
    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.
     

    Attached Files:

    jwitt98, Jan 10, 2010 IP
  11. Tasameem

    Tasameem Active Member

    Messages:
    288
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #11
    Tasameem, Jan 11, 2010 IP
  12. Mentalhead

    Mentalhead Active Member

    Messages:
    1,344
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    53
    #12
    Mentalhead, Jan 11, 2010 IP
  13. zainkafeel

    zainkafeel Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    PSD to HTML Great Solution to Fix PNG in IE6 is Alpha Filter on CSS
     
    zainkafeel, Jan 11, 2010 IP