Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/10/2008, 15:41
chuekeron
 
Fecha de Ingreso: octubre-2008
Ubicación: Bs. As., ARG
Mensajes: 203
Antigüedad: 15 años, 6 meses
Puntos: 6
Maldito ie6 - ayuda con png

LA VERDAD QUE ESTOY PODRIDO DE ESTO DE LA COMPATIBILIDAD, Y MAS AUN DE LOS QUE SIGUEN USANDO IE6, Q POR DESGRACIA LOS HAY. BUENO, VAMOS AL PROBLEMA...EL TIPICO BUB DE LAS PNG, EN ESTE CASO FOTOS CON UN SOMBREADO...PERO DETRAS DE LA SOMBRA ME APARECE UN FONDO BLANCO. EL TEMA ES QUE RECURRI AL METODO DEL JAVASCRIPT PNGFIX.JS, DEL CUAL DICEN QUE FUNCIONA BIEN. EL TEMA ES QUE A MI NO. ADJUNTE EL SCRIPT EN LA CABEZERA Y SUBI EL ARCHIVO .JS AL HOST. POR FAVOR ESTO ES ALGO QUE SE USA HACE RATO, SEGURO ALGUIEN DEBE DE TENER UNA SOLUCION. LES ADJUNTO TANTO EL LLAMADO AL SCRIPT COMO EL CODIGO JS:


<!--[if lt IE 7.]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->
<!--[if IE]>



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.AlphaIma geLoader"
+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
img.outerHTML = strNewHTML
i = i-1
}
}
}