Return to Snippet

Revision: 13001
at April 3, 2009 17:39 by oscargodson


Updated Code
/*
   Works best for background images with set dimensions
   Just add a ".pngfix" class to anything you want fixed
   or put in some other jQuery selector.
*/
$('.pngfix').each( function() {
   $(this).attr('writing-mode', 'tb-rl');
   $(this).css('background-image', 'none');
   $(this).css( 'filter', 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="path/to/image.png",sizingMethod="scale")');
});

Revision: 13000
at April 3, 2009 17:36 by oscargodson


Initial Code
/*
   Works best for background images with set dimensions
   Just add a ".pngfix" class to anything you want fixed
   or put in some other jQuery selector.
*/
$(’.pngfix’).each( function() {
   $(this).attr(’writing-mode’, ‘tb-rl’);
   $(this).css(’background-image’, ‘none’);
   $(this).css( ‘filter’, ‘progid:DXImageTransform.Microsoft.AlphaImageLoader(src=”path/to/image.png”,sizingMethod=”scale”)’ );
});

Initial URL
http://itknowledgeexchange.techtarget.com/web-standards/jquery-png-fix-for-ie6-single-instance-images/

Initial Description
This was not written by me, but Jeffrey Olchovy. I uploaded it here because his blog messes up the quotes.

Initial Title
Super Simple jQuery PNG Fix for IE6 background images

Initial Tags
javascript, jquery, ie6

Initial Language
jQuery