Foros del Web » Creando para Internet » HTML »

Maldito ie6 - ayuda con png

Estas en el tema de Maldito ie6 - ayuda con png en el foro de HTML en Foros del Web. 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, ...
  #1 (permalink)  
Antiguo 10/10/2008, 15:41
 
Fecha de Ingreso: octubre-2008
Ubicación: Bs. As., ARG
Mensajes: 203
Antigüedad: 15 años, 5 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
}
}
}
  #2 (permalink)  
Antiguo 10/10/2008, 22:42
Avatar de seoista  
Fecha de Ingreso: septiembre-2003
Ubicación: Pues leyéndote
Mensajes: 1.076
Antigüedad: 20 años, 6 meses
Puntos: 59
Respuesta: Maldito ie6 - ayuda con png

¡No repitas!.

Tienes ya hecha esta pregunta en Web General.

Saludos.
__________________
· No contesto por M.P.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 03:39.