This plugin uses CSS technique to fix the png image transparency issue and jQuery to apply this script to all of png images shown in the page. The CSS code added by the script is :
.png {
background-image: expression(
this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + (this.tagName==\'IMG\' ? this[\'src\'] : this.currentStyle[\'backgroundImage\'].split(\'\"\')[1]) + ")",
this.runtimeStyle.backgroundImage = "none",
this.src = "{plugindir}/pixel.gif",
this.width = this.style.width | this.clientWidth,
this.height = this.style.height | this.clientHeight
);
}';
And the jQuery code which applies this css to all of the png images :
$(document).ready(function(){
if(($.browser.msie)&(parseInt($.browser.version)<7)){
$("img[src$='.png']").each(function(){$(this).addClass("png");});
}
});
That’s all. The jQuery library is included in the plugin so you don’t need to modify anything.
Installation is simple. Just follow these steps :
- Upload ‘wp-pngfix’ directory to the ‘/wp-content/plugins/’ directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Thats all. Go to any page which contains some png images with IE and check if there’s any errors.
This should fix them all except backgrounds now.
Download: Official WordPress plugin page : http://wordpress.org/extend/plugins/wp-pngfix/
Note: This type of fixes cause slight color changes to your png images with background color, so you may have to change some css.If you use images without inner backgrounds and only need to show the background transparent, forget that note







[...] 15) WP pngfix- This plugin uses CSS technique to fix the png image transparency issue and jQuery to apply this script to all of png images shown in the page. [...]
[...] WP pngfix [...]
[...] from here 15) WP pngfix- This plugin uses CSS technique to fix the png image transparency issue and jQuery to apply this [...]
[...] from here 15) WP pngfix- This plugin uses CSS technique to fix the png image transparency issue and jQuery to apply this [...]
Is the plugin still working after you did that?
GOT MY SITE TO VALIDATE WITHOUT ANY VALIDATION WARNING – with PNGFIX
In the pngfix.php
Revise the & and < (less-than) sign with the code below.
if(($.browser.msie)"&"(parseInt($.browser.version)<7)){
Hope that helps.
I use the PNGFIX to fix PNG transparency images that I have posted on my gallery page: http://irishguy.info/graphic-design/ – the plug-in works great.
However, when trying to validate my website I got two warnings.
if(($.browser.msie)&(parseInt($.browser.version)<7)){
The first error is for the "&" and the second is for using the "<"
To solve the first error I changed the & to "&"
Still trying to figure out how to validate without a warning for the "<" (less than sign) being included.
Any suggestions. Thanks for the plug-n
Is it compatible with wordpress 2.7.1 ? Please help…
heres the link
I installed your code for a png hack and at the top of the page on IE 6 I there is excessivel code ” ‘; ?>” (without the quotes)
On the most recent safari I see ‘; ?>
I have been trying to get these hacks out for a while and have had no luck. Any help would be appreciated