The answer is yes and no, for Internet Explorer supporting alpha transparent PNGs. Here's a hack to get it to work:
Code:
/* This would be your normal CSS file, viewable by Internet Explorer and
* non-IE browsers. */
#someDIV {
background: transparent url(path/to/bg.png) repeat-y scroll 0 0;
}
The above code will get things to work for Gecko (Firefox, Mozilla, Netscape 7+, etc), KHTML (Safari, Omniweb, etc) and Trident (Internet Explorer 7 only) browsers. Gecko, KHTML and Trident are the three main browser rendering engines used today. To get alpha transparent PNGs to work with IE 5.5 and 6 (which use an older version of the Trident rendering engine), you need a little bit of, shall we say... coercion. Insert the following snippet of code into the HEAD of every HTML document in which you want 24-bit transparent PNGs:
Now in the aptly named Fix_Internet_Explorer.css file:
Code:
/* IE7 does not support the star-html hack anymore, so this is ignored by IE7: */
* html #someDIV {
background: transparent none;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='path/to/bg.png',sizingMethod='scale');
}
And that's it. Also note that the URL in AlphaImageLoader(src='...') I've found to be relative to the HTML document that calls the style sheet, rather than relative to the stylesheet that has the filter: CSS property. Another snagging point is that Internet Explorer will shrink or crop the HTML element's boundries to fit the image loaded using the AlphaImageLoader. You can also cause the background image to stretch to the boundries of its containing HTML tag.
and i have a pngfix.js file...everything work awesome..but now it doesnt...this is after i added an include for my flash navigation...i have an active X fix for flash so you dont hav eto click to activate..but i dont see why the png fix isnt working now..comepletely different JS files on seperate pages! any ideas?
"Problems cannot be solved by the same level of thinking that created them.”
Are you getting a javascript error? And I've never seen the defer attribute for SCRIPT tags before. If it's not working on different pages, perjaps the src for the PNG fix js file is incorrect on the other page? Could be because you use a relative URL for the pngfix.js file and the other page is located in a different directory on your server compared to the first page?
Bookmarks