Professional Web Applications Themes

Transparency doesn't work under IE, but does under Mozilla - PHP Development

I am trying to get transparency to work, for a number of functions on my website. The code works flawlessly under Mozilla, but doesn't become transparent under IE. The code below is just a snippet, as I copy an image into a portion of it (trying to make a drop shadow). It's perfectly transparent under Mozilla, but not at all under IE -- the color shows up! Any suggestions? Tom header("Content-type: image/png"); // create the image $om = imagecreatetruecolor($newwidth + 4, $newheight + 4); $tfill = imagecolorallocate($om, 120, 121, 122); // gray color unlikely to be used //create the rectangle ...

  1. #1

    Default Transparency doesn't work under IE, but does under Mozilla

    I am trying to get transparency to work, for a number of functions on my
    website. The code works flawlessly under Mozilla, but doesn't become
    transparent under IE.

    The code below is just a snippet, as I copy an image into a portion of it
    (trying to make a drop shadow).

    It's perfectly transparent under Mozilla, but not at all under IE -- the
    color shows up!

    Any suggestions?

    Tom

    header("Content-type: image/png");

    // create the image
    $om = imagecreatetruecolor($newwidth + 4, $newheight + 4);
    $tfill = imagecolorallocate($om, 120, 121, 122); // gray
    color unlikely to be used

    //create the rectangle with the transparency color
    imagefilledrectangle($om, 0, 0, $newwidth + 4, $newheight + 4, $tfill);
    // fill it

    // make it transparent
    imagecolortransparent($om, $tfill); // make that transparent

    // display it
    imagepng($om);

    imagedestroy($om);




    Tom Guest

  2. #2

    Default Re: Transparency doesn't work under IE, but does under Mozilla

    Tom Scales wrote:
    <snip>


    IE is useless,

    use this to hack it:

    http://www.skyzyx.com/scripts/sleight.php


    Andrew
    Andrew Guest

  3. #3

    Default Re: Transparency doesn't work under IE, but does under Mozilla


    "Andrew Bullock" <com> wrote in
    message news:PrsGe.4634$ntli.net... 

    Well, that's ridiculous. Realistically, I have to support IE. This hack
    works, almost, and fixes alpha, but not regular transparency, so it's not
    perfect for me.

    Tom


    Tom Guest

  4. #4

    Default Re: Transparency doesn't work under IE, but does under Mozilla

    Tom Scales wrote: 

    IE doesn't support transparent PNG files. Have you attempted outputting
    a GIF file with this code instead?

    Matt Darby
    Matt Guest

  5. #5

    Default Re: Transparency doesn't work under IE, but does under Mozilla

    Tom Scales wrote: 
    >
    >
    > Well, that's ridiculous. Realistically, I have to support IE.[/ref]

    Blame Mr Gates, not me.
     

    What do you mean, "not regular transparancy", i've not had a problem
    with it?


    Andrew
    Andrew Guest

  6. Moderated Post

    Default Re: Transparency doesn't work under IE, but does under Mozilla

    Removed by Administrator
    Kimmo Guest
    Moderated Post

Similar Threads

  1. Shockwave Player Doesn't Work With Mozilla Firefox1.5.0.7
    By I_want_results in forum Macromedia Shockwave
    Replies: 0
    Last Post: February 14th, 01:39 AM
  2. Shockwave Doesn't Work With Mozilla Firefox 1.5.0.7
    By BTJustice in forum Macromedia Shockwave
    Replies: 1
    Last Post: September 23rd, 01:33 PM
  3. Replies: 1
    Last Post: August 16th, 11:46 PM
  4. Replies: 0
    Last Post: September 17th, 04:04 AM
  5. mozilla-mail: ctrl+shift+c doesn't work anymore
    By Andreas Fromm in forum Debian
    Replies: 3
    Last Post: August 3rd, 10:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139