Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/09/2008, 10:32
Avatar de Threepwood
Threepwood
 
Fecha de Ingreso: febrero-2002
Ubicación: Argentina
Mensajes: 906
Antigüedad: 22 años, 2 meses
Puntos: 4
Respuesta: PNG 32 No sale fondo transparente en IE 6

Hola!

Puedes probar poner esto entre el <head>

Código:
<!--[if gte IE 5.5000]>
<script language="JavaScript">
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
{
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 + "\');\"></span>"
img.outerHTML = strNewHTML
i = i-1
}
}
}
window.attachEvent("onload", correctPNG);
</script>
<![endif]-->
Ya no necesitas usar el filter:Alpha...

Esta es una buena solución aunque no aplica a background-image, para eso si necesitas usar el IEPNGFIX que funciona correctamente. Checa las rutas al archivo htc y al .gif, de todas maneras aqui hay info más detallada.

http://www.twinhelix.com/css/iepngfix/demo/

Salu2

Sam
__________________
Equívocos sin importancia