png transparency in J1.5 - Joomla! Forum - community, help and support
i'm upgrading site j1.0.12 j1.5. template uses bunch of pngs transparency, , old j1.0.12 site, using ultimate png fix mambot joomlaworks. no longer works 1.5 (in legacy mode).
any suggestions?
any suggestions?
add template somewhere inside section:
source : http://homepage.ntlworld.com/bobosola/index.htm
bob osola, author, offers several tips on implementation. above 1 of ways it.
ford
code: select all
<!--[if lt ie 7]>
<script language="javascript">
function correctpng() // correctly handle png transparency in win ie 5.5 & 6.
{
var arversion = navigator.appversion.split("msie")
var version = parsefloat(arversion[1])
if ((version >= 5.5) && (document.body.filters))
{
for(var i=0; i<document.images.length; i++)
{
var img = document.images[i]
var imgname = img.src.touppercase()
if (imgname.substring(imgname.length-3, imgname.length) == "png")
{
var imgid = (img.id) ? "id='" + img.id + "' " : ""
var imgclass = (img.classname) ? "class='" + img.classname + "' " : ""
var imgtitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
var imgstyle = "display:inline-block;" + img.style.csstext
if (img.align == "left") imgstyle = "float:left;" + imgstyle
if (img.align == "right") imgstyle = "float:right;" + imgstyle
if (img.parentelement.href) imgstyle = "cursor:hand;" + imgstyle
var strnewhtml = "<span " + imgid + imgclass + imgtitle
+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgstyle + ";"
+ "filter:progid:dximagetransform.microsoft.alphaimageloader"
+ "(src=\'" + img.src + "\', sizingmethod='scale');\"></span>"
img.outerhtml = strnewhtml
= i-1
}
}
}
}
window.attachevent("onload", correctpng);
</script>
<![endif]-->
source : http://homepage.ntlworld.com/bobosola/index.htm
bob osola, author, offers several tips on implementation. above 1 of ways it.
ford
Comments
Post a Comment