<![CDATA[ PNG-alpha transparency for MSIE plugin - to see transparencies in IE too!! - My Forums]]> https://forums.modx.com/thread/?thread=49038 <![CDATA[Re: PNG-alpha transparency for MSIE plugin - to see transparencies in IE too!!]]> https://forums.modx.com/thread/49038/png-alpha-transparency-for-msie-plugin---to-see-transparencies-in-ie-too#dis-post-286901 Quote from: Dr. at Nov 26, 2007, 04:31 AM

Sorry, but the javascript can only manipulate DOM elements such as <img /> tags. It cannot dynamically replace CSS code.
That would be really sweet though!
Quote from: sottwell at Nov 26, 2007, 07:45 AM

Actually, it can override the included css file by specifying a new style for the given element at run-time.
Sorry Susan.
Allow me to clarify my statement.
The phrase "the javascript" in my quote above was in reference to the code within the PNG alpha plugin.
Javascript (ECMAScript), as a scripting language can do many things that this plugin has no examples of.

The code that this plugin is based on was originally written in 2004 and last updated in January of 2006.
http://homepage.ntlworld.com/bobosola/

Here are the Pros & Cons as listed by the author:
Pros:

  • Ignored as a comment in other browsers - it’s only run by Windows IE.
  • Works with (X)HTML Strict & Transitional Doctypes
  • Does not break W3C validation
  • Lightweight and very easily deployed
  • Works with existing in-line or external CSS rules based on class or ID selectors
  • Works with old-style img align="left" or align="right" attributes
  • Runs after any existing Body Onload code
  • Works with imagemaps and input images using a special version

Cons:
  • Doesn’t work in IE versions earlier than 5.5 - the AlphaImageLoader filter wasn’t introduced until version 5.5. There is no cure for earlier versions.
  • Requires JavaScript to be enabled - the estimations for how many people choose not to use JS vary wildly. See note [1]
  • CSS backround PNGs not supported - experimentation revealed I could traverse the Stylesheets collection and use the AlphaImageLoader trick to replace all background-image attributes containing PNGs, but then background-repeat would not work, and anchors placed over non-transparent parts of the image were not clickable :-(
  • CSS rules for the PNG images based on the img selector are lost, but this is easily rectified by adding a class selector to your img rule such that img{..} becomes img,.png{..} - then add the attribute class="png" to each of your PNGs.

-sD-
Dr. Scotty Delicious, DFPA.]]>
ScottyDelicious Nov 26, 2007, 03:47 AM https://forums.modx.com/thread/49038/png-alpha-transparency-for-msie-plugin---to-see-transparencies-in-ie-too#dis-post-286901
<![CDATA[Re: PNG-alpha transparency for MSIE plugin - to see transparencies in IE too!!]]> https://forums.modx.com/thread/49038/png-alpha-transparency-for-msie-plugin---to-see-transparencies-in-ie-too#dis-post-286900 sottwell Nov 26, 2007, 01:45 AM https://forums.modx.com/thread/49038/png-alpha-transparency-for-msie-plugin---to-see-transparencies-in-ie-too#dis-post-286900 <![CDATA[Re: PNG-alpha transparency for MSIE plugin - to see transparencies in IE too!!]]> https://forums.modx.com/thread/49038/png-alpha-transparency-for-msie-plugin---to-see-transparencies-in-ie-too#dis-post-286899 That would be really sweet though!

-sD-
Dr. Scotty Delicious, DFPA.]]>
ScottyDelicious Nov 25, 2007, 10:31 PM https://forums.modx.com/thread/49038/png-alpha-transparency-for-msie-plugin---to-see-transparencies-in-ie-too#dis-post-286899
<![CDATA[PNG-alpha transparency for MSIE plugin - to see transparencies in IE too!!]]> https://forums.modx.com/thread/49038/png-alpha-transparency-for-msie-plugin---to-see-transparencies-in-ie-too#dis-post-286898 http://www.modxcms.com/PNG-Alpha-Transparency-for-MSIE-652.html
Has anyone tried it?
I set it up, but it doesn’t work. In my case the PNG is a background image called in the css.
Does it work only with the inline images? Or just I made a mistake installing it?

Regards]]>
asamax01 Nov 25, 2007, 04:41 PM https://forums.modx.com/thread/49038/png-alpha-transparency-for-msie-plugin---to-see-transparencies-in-ie-too#dis-post-286898