Page 1 of 1

PNG transparency

Posted: Thu Feb 01, 2007 12:56 pm
by mr p
Has anyone used the solution given here for PNG transparency http://koivi.com/ie-png-transparency/?

I'd like to use png's in the menu if possible, which the javascript solution doesn't work with (as the images are in css, not html).

Any thoughts?

Re: PNG transparency

Posted: Thu Feb 01, 2007 1:01 pm
by cyberman
Have you tried to insert it in index.php?

Re: PNG transparency

Posted: Thu Feb 01, 2007 1:19 pm
by mr p
I've not tried anything yet, I'm just doing a lot of reading at the moment.  I'm not terribly comfortable with PHP at this stage, so I'm trying to get my head together before trying things.

It says on the page I linked to that it interferes with javascript work arounds, which is partly why I asked if anyone had used it.

Re: PNG transparency

Posted: Fri Feb 02, 2007 2:56 am
by heatherfeuer
I also prefer png image files because I can get alpha channel transparency and 16 million colors.  However, as many know, IE doesn't play well with transparent png files.  I found a fix that works well for me.  I won't swear that it works with png files in CSS because I call the images inside the divs in the templates.

The information about this can be found here: http://homepage.ntlworld.com/bobosola/pnghowto.htm.  The file itself is called pngfix.js.  The code to call it is:

Code: Select all

<!--[if lt IE 7.]>
<__script__ defer type="text/javascript" src="pngfix.js"></__script>
<![endif]-->
Works in IE 6 just as well.

Re: PNG transparency

Posted: Fri Feb 23, 2007 10:48 pm
by Elijah Lofgren
It doesn't make sense, but this CSS code seems to work to make PNG's transparent in IE:

Code: Select all

img { behavior: url(iepngfix.htc); }
Hope this helps,

Elijah

Re: PNG transparency

Posted: Sat Feb 24, 2007 1:40 am
by Dee
Elijah Lofgren wrote: It doesn't make sense
It makes more sense when iepngfix.htc (and blank.gif) are your css directory.

Regards,
D

Re: PNG transparency

Posted: Sat Feb 24, 2007 4:07 am
by Elijah Lofgren
Dee wrote:
Elijah Lofgren wrote: It doesn't make sense
It makes more sense when iepngfix.htc (and blank.gif) are your css directory.

Regards,
D
But what's weird is that those files were not and it still worked. :)

- Elijah