PNG in IE??

Discussion in 'HTML & Website Design' started by Graphixx, Sep 1, 2006.

  1. #1
    Graphixx, Sep 1, 2006 IP
  2. Mano70

    Mano70 Peon

    Messages:
    42
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Mano70, Sep 1, 2006 IP
  3. liam

    liam Guest

    Messages:
    79
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    To create transparency you need to use a different format to jpgs. You should be using gif or png file formats. You can convert your image into these formats by using the export wizard on many graphics programs.

    Here are a few threads that relate to your issue and may help you further:

    http://forums.digitalpoint.com/showthread.php?t=127452

    http://forums.digitalpoint.com/showthread.php?t=126818
     
    liam, Sep 1, 2006 IP
  4. liam

    liam Guest

    Messages:
    79
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    actually my mistake yeah IE doesnt support transparent png format. You need to use the gif format
     
    liam, Sep 1, 2006 IP
  5. Graphixx

    Graphixx Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I tried out with .gif but that didnt went out so good
     
    Graphixx, Sep 1, 2006 IP
  6. liam

    liam Guest

    Messages:
    79
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #6
    When you export your file to gif format make sure that you enable alpha transparency
     
    liam, Sep 1, 2006 IP
  7. Notorious

    Notorious Well-Known Member

    Messages:
    903
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    145
    #7
    Checked on IE 7,no support for PNG transparency.
     
    Notorious, Sep 1, 2006 IP
  8. clenard

    clenard Active Member

    Messages:
    458
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    95
    #8
    clenard, Sep 1, 2006 IP
  9. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #9
    frankcow, Sep 1, 2006 IP
  10. Mano70

    Mano70 Peon

    Messages:
    42
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Mano70, Sep 1, 2006 IP
  11. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #11
    Yes, IE7 does support it. You have to actually disable the transparency alpha filter fix for IE 7
     
    frankcow, Sep 1, 2006 IP
  12. Graphixx

    Graphixx Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Could someone please give me a real step by step to make it work??
    The blank.gif is in the image folder.
    I added this one in the CSS file right under BODY:
    function fixPNG()
    {
            for(var i=0; i<document.images.length; i++)
            {
                    if(document.images[i].src)
                    {
                            var imgName = document.images[i].src.toUpperCase()
                            if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
                            {
                                    document.images[i].runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + document.images[i].src + "', sizingMethod='image');";
                                    document.images[i].src='images/blank.gif';
                            }
                    }
            }
    }
    agt = navigator.userAgent.toLowerCase();
    if((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1))
    {
            window.attachEvent("onload", fixPNG);
    }
    
    Code (markup):
    In FF its same same,but in IE its nothing now, dont see anything of the PNG,maybe i did something wrong?

    Maybe i cant get it to work at all?

    Here is the code where the PNG is:
    <tr> 
    
        <td background="<?php echo $mosConfig_live_site;?>/templates/lost's/images/1.png"><table width="100%" border="0" cellspacing="5" cellpadding="5">
    
            <tr>
    Code (markup):

    Any suggestions on what i have done wrong?

    Regards

    Graphixx
     
    Graphixx, Sep 1, 2006 IP
  13. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #13
    It doesn't work on backgrounds

    the only way to simulate that is to place the image on the site, give it a lower z-index than the foreground content, and position it behind the content
     
    frankcow, Sep 1, 2006 IP
  14. sojic

    sojic Active Member

    Messages:
    133
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    90
    #14
    Try this webfx.eae.net/dhtml/pngbehavior/pngbehavior.html
     
    sojic, Sep 1, 2006 IP
  15. Graphixx

    Graphixx Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Anyone that can help me out to make this in css instead?
    I found a code that worked but i have no idea on how to add in the css to make it correct:(
     
    Graphixx, Sep 2, 2006 IP
  16. ketan9

    ketan9 Active Member

    Messages:
    548
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #16
    I would say just stick with transparent gifs as transparent pngs are not well supported on many browsers. So instead of doing hacks, just put in transparent gifs
     
    ketan9, Sep 2, 2006 IP