Ie6 background image png AlphaImageLoader issue after loading with mootools 1.11

I am trying to make a .png background image in ie6 after a mootools onclick event that changes the background image of the logo div.

here is the relevant code as it is now -

if(!window.ie6){
    $('logo').setStyle('background-image', imagePath);
}else{
    $('logo').setStyles({
    filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+imagePath+")"
    });
}

      

this, for some reason, doesn't seem to work! the event is triggered and works fine for all other browsers, but the logo is just blank when it works in ie6.

If anyone could shed some light on this or have any ideas, I would be greatly obliged.

Cheers, peter

0


a source to share


1 answer


have you tried saving PNG as PNG8? this way you can handle IE6 gracefully. keeps all that alpha load.

futher why not try to write your css in conditional stylesheets and just change the class (or add more) of the element in question rather than its inline attributes.



http://www.sitepoint.com/blogs/2008/03/20/making-ie6-friendly-png8-images/

+1


a source







All Articles