Tuesday, August 12th, 2008
Micah Tischler wasn’t happy with the variety of approaches for allowing transparent PNG support in IE 6, so he continued his work with mtjs_iepnghandler which intelligently provides true background repeat functionality for transparent PNGs as well as full positioning.
In this script image tags are supported, both with and without a blank spacer GIF, and background image PNGs may be positioned, as well as repeated, even if they’re smaller than the content element they’re in. Also, the repeat functionality is implemented to provide true repeat functionality, rather than just stretching everything willy-nilly.
mtjs_iepnghandler.js traverses the DOM, making adjustments where it runs into PNGs. The methods used depend on whether a PNG is in use as an image, or as a background, and, if it’s a background, whether it is repeated or positioned. The script also takes into account the dimensions of the PNG to make intelligent decisions about how to implement repeats. It should be noted that, like mtjs_csswalker_iepnghandler.js, the script just sits quietly and does nothing on browsers other than IE5-6.
Micah finishes up his post comparing his solution to the others out there.
Posted by Dion Almaer at 5:47 am