Standards compliant png hack for Internet Explorer 6
If you have ever designed a webpage using alpha transparent .png graphics you are aware that Internet Explorer does not handle these correctly. So you went to your favorite search engine, looked up a fix and you might have found a solution using a .htc file and a transparent 1px by 1px .gif. So your finished with you new shiny site and it even displays correctly in IE6, but you notice one thing. Your CSS has errors in it?? This is because when using the .htc file in your css wherever you set a .png file as a background, you have to declare it as a "behavior". Unfortunately, "behavior" is not a standards compliant attribute in CSS.
The solution, Unit PNG Fix. It achieves the same result as before, except it does it without touching the CSS. You simply download the package from here. Upload it to your webserver and include the .js file in the head of your site.
From the Unit Interactive Labs Website;
Unit png fix is,
- Very compact javascript: Under 1kb!
- Fixes most interactivity problems caused by IE’s filter attribute.
- Works on img objects and background-image attributes.
- Runs automatically. You don’t have to define classes or call functions.
- Allows for auto width and auto height elements.
- Super simple to deploy.
No Comments
Jump to comment form | Comments rss