jQuery: The Write Less, Do More JavaScript Library

jquery.ifixpng.js IE 7 Transparency is Black instead of transparent

View: New views
8 Messages — Rating Filter:   Alert me  

jquery.ifixpng.js IE 7 Transparency is Black instead of transparent

by cfdvlpr :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I'm just trying this nice jquery plugin and it works great to solve
some of my IE 6 PNG image problems.  But, in IE 7, the images are
black.  Has anyone else seen this and found a fix for it?  Is this a
problem specifically with PNG 24 alpha transparency?


Re: jquery.ifixpng.js IE 7 Transparency is Black instead of transparent

by Guy Fraser-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


cfdvlpr wrote:
> I'm just trying this nice jquery plugin and it works great to solve
> some of my IE 6 PNG image problems.  But, in IE 7, the images are
> black.  Has anyone else seen this and found a fix for it?  Is this a
> problem specifically with PNG 24 alpha transparency?
>  

IE7 natively supports PNG images - so make sure the plugin detects IE7
and doesn't run. We used a conditional comment around the script tag to
prevent IE7 processing it...

<!--[if lte IE 7.0000]>
  <script ....>
<![endif]-->




Re: jquery.ifixpng.js IE 7 Transparency is Black instead of transparent

by Rick Faircloth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi, Guy...

Why wouldn't you use "if lt IE 7" instead of "lte" ?

Rick

> -----Original Message-----
> From: jquery-en@... [mailto:jquery-en@...] On Behalf Of Guy Fraser
> Sent: Wednesday, November 14, 2007 10:23 PM
> To: jquery-en@...
> Subject: [jQuery] Re: jquery.ifixpng.js IE 7 Transparency is Black instead of transparent
>
>
> cfdvlpr wrote:
> > I'm just trying this nice jquery plugin and it works great to solve
> > some of my IE 6 PNG image problems.  But, in IE 7, the images are
> > black.  Has anyone else seen this and found a fix for it?  Is this a
> > problem specifically with PNG 24 alpha transparency?
> >
>
> IE7 natively supports PNG images - so make sure the plugin detects IE7
> and doesn't run. We used a conditional comment around the script tag to
> prevent IE7 processing it...
>
> <!--[if lte IE 7.0000]>
>   <script ....>
> <![endif]-->
>
>




Re: jquery.ifixpng.js IE 7 Transparency is Black instead of transparent

by cfdvlpr :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


My IE 7 doesn't seem to support PNGs like yours does.

How about in the head:

<!--[if lt IE 7.0000]>
   <script type="text/javascript" src="/jquery/plugins/
jquery.ifixpng.js"></script>
<![endif]-->
<!--[if gte IE 7.0000]>
   <script defer type="text/javascript" src="/javascript/pngfix.js"></
script>
<![endif]-->

And and then in
$(function(){

  //Use jQuery plugin to fix PNG images in IE 6
  if( $.browser.msie && (jQuery.browser.version < 7.0000) ) {
    $('img[@src$=.png]').ifixpng();
  }

}

Re: jquery.ifixpng.js IE 7 Transparency is Black instead of transparent

by Guy Fraser-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


cfdvlpr wrote:

> My IE 7 doesn't seem to support PNGs like yours does.
>
> How about in the head:
>
> <!--[if lt IE 7.0000]>
>    <script type="text/javascript" src="/jquery/plugins/
> jquery.ifixpng.js"></script>
> <![endif]-->
> <!--[if gte IE 7.0000]>
>    <script defer type="text/javascript" src="/javascript/pngfix.js"></
> script>
> <![endif]-->
>  

Why are you doing this:

<!--[if gte IE 7.0000]>
   <script defer type="text/javascript" src="/javascript/pngfix.js"></script>
<![endif]-->


IE7 natively supports PNG alpha transparency as background images and normal images. No need to do any png fixing in IE7 and any attempt to do so will probably make things worse.


Re: jquery.ifixpng.js IE 7 Transparency is Black instead of transparent

by cfdvlpr :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Am I the only one with IE 7 that has noticed this problem?  I'm using
IE 7.0.5730.11

Re: jquery.ifixpng.js IE 7 Transparency is Black instead of transparent

by Andy Matthews-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Do you have a link?

-----Original Message-----
From: jquery-en@... [mailto:jquery-en@...] On
Behalf Of cfdvlpr
Sent: Friday, December 07, 2007 4:24 PM
To: jQuery (English)
Subject: [jQuery] Re: jquery.ifixpng.js IE 7 Transparency is Black instead
of transparent


Am I the only one with IE 7 that has noticed this problem?  I'm using IE
7.0.5730.11



Re: jquery.ifixpng.js IE 7 Transparency is Black instead of transparent

by cfdvlpr :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message