Back to vBulletin 3.7 Template Modifications

fix png transparency
Mod Version: 1.00, by RC.

This modification is in the archives.
vB Version: 3.7.0 Rating: (5 votes - 4.80 average) Installs: 40
Released: 26 May 2008 Last Update: Never Downloads: 12
Not Supported Template Edits  

this code fix the png transparency problems whit ie5 and ie 6

this is very simple:
in the header template add this code very top:

PHP Code:

<!--[if gte IE 5.5000]>
<
script language="JavaScript">
function 
correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
{
for(var 
i=0i<document.images.lengthi++)
{
var 
img document.images[i]
var 
imgName img.src.toUpperCase()
if (
imgName.substring(imgName.length-3imgName.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.hrefimgStyle "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 "\');\"></span>"
img.outerHTML strNewHTML
i-1
}
}
}
window.attachEvent("onload"correctPNG);
</
script>
<![endif]--> 


If you Like This Mod

enjoy

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024