As you know, IE6 has bug that can't display semi-transparent PNG file without using non-standard style like filter. In IE7, this problem is fixed. But It still has some bug about PNG file. It can't correctly display fading semi-transparent PNG file. You can clearly see it when you use show/hide function in jQuery with semi-transparent PNG file. The background of image is displayed with non-transparent black color.
Do you have any idea for solve this question by using jQuery.
Update
Let's see my testing
As you see, IE8 always incorrectly displays PNG-24 image. Moreover, IE8 still correctly display PNG-8 image when I fade(jQuery.fadeOut function) it only. But It incorrectly display PNG-8 image when I fade & resize(jQuery.hide function) at the same time.
PS. You can download my testing source code from here.
Thanks,
This can be done similar to what Stu has done here: http://www.cssplay.co.uk/menus/flyout_horizontal.html
Im having the same annoying problem with IE8 and IE7.. anyone tested if Cmc solutions does the trick?
My url is http://www.onlinebrand.dk (Top menu fades in, like Google :) But IE don't care.)
EDIT: Just tested it myself, and even if I set width and height of, well the repeating img. It doesn't work
I just found another work around, where Fadein a wrapper instead of the div with the .png bg image. And it sort of worked, Im now getting som sort of transparency in IE, but also, some padding/margin..Totally wierd..
Bill Gates, Whats up with this? Why can't we get along?
i use a modified PNG fix for IE6 it works just great:
dont forget to upload x.gif. (a transparent 1x1 gif)
Use Unit PNG Fix for semitransparent png-24.
The root cause of the problem appears to be Micrsoft IE's poor support for the PNG alpha-transparency (in any version of IE). IE6 is the worst offender by far, rendering alpha-transparent pixels as a pale blue color. IE7 and IE8 handle PNG alpha-transparency, but can't handle changing the opacity of an alpha-transparent pixel in the PNG – they render as black instead of transparent.
My own fixes for this depend on the situation. Here are some approaches:
Conditional comments:
In the css:
Via JavaScript detection:
The iepngfix.htc behavior works by replacing the PNG with a blank image (blank.gif) and then using Microsoft's DXImageTransform routines to load the PNG as a filter on the blank image. There are other PNG fixes out there which work by wrapping things in divs or spans, but those will often break your layout, so I avoid them.
Hope this helps.
I just found the way to solve problem by chance when I try to fix IE8 bug in the following image.
The easiest way, You just define background of current image like the below code. Or you can see full source code and demo on my JsFiddle
However, if you have some complex image like my bug, you should try to add almost invisible layer below your image and set background color to some color that you like.