Use this code on your <head>;

<!--[if lt IE 8]>
<script type="text/javascript">
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
if ((version >= 5.5) && (document.body.filters))
{
   for(var i=0; i<document.images.length; i++)
   {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) ==
"PNG")
      {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className +
"' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " :
"title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" +
imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" +
imgStyle
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         + " style=\"" + "width:" + img.width + "px; height:" +
img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'" + img.src + "\', sizingMethod='scale');\"></
span>"
         img.outerHTML = strNewHTML
         i = i-1
      }
   }
}
</script>
<![endif]-->

This code is an old one but works greath. Taken from
http://homepage.ntlworld.com/bobosola/ .
Wish it helps.

On 13 Kasım, 22:55, Phillysoul11 <phillysou...@hotmail.com> wrote:
> Hi, so I've been coding this site and I use jquery in a few places. I've been
> testing it in chrome and FF and everything has been fine but when I tested
> it in IE8 none of my png images would show up. I checked all my settings but
> it seemed to be a javascript issue. I remade all my images to be jpegs and
> everything worked. I tried this in Opera and it had the same problem as IE8.
> I really need to use png images (they are smaller+transparent) for this
> project so I'm trying to get it sorted out.  All of the png images will show
> if I don't call the jquery library in my html doc. Even with all of the
> other javascript files they all work so it seems to be that the jQuery
> library seems to be causing a problem in IE8/Opera supporting png images.
> The png images also work if I turn javascript off in the browser. If you
> guys have any idea as to what might be causing this I would really
> appreciate it.
>
> thanks a bunch!
>
> Regards,
> Phillysoul11
>
> --
> View this message in 
> context:http://old.nabble.com/jquery-png-problem-tp26343402s27240p26343402.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to