PDA

Click to See Complete Forum and Search --> : HELP! IE PNG Transparency


chris_bcn
05-22-2006, 09:43 PM
Can I make png transparency with background images work in IE?

http://comediadesign.com/potrero/bi/wireframe.html

the CSS for the mast is:

#mast{
background: transparent url(../images/mast_blank.png);
height:110px;
margin:10px auto 0;
overflow:auto;
}
I then added

*html #mast
{
background: transparent url(../images/mast_blank.png);
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader (src='../images/mast_blank.png', sizingMethod='scale');
}

but that didn't work - any ideas? Am I just being dim?

chris_bcn
05-22-2006, 10:01 PM
this js fix seems to work - have to fiddle about and look at it properly - thought it might be useful to someone

http://www.allinthehead.com/retro/69

EC
05-22-2006, 10:16 PM
in Andy Budd's CSS mastery he talks about IE proprietary CSS that forces png transparency. I haven't tried it but it looks like this in his example:

*edit -- sorry the forum keeps horking the code even when I do "[code]" grrr.

chris_bcn
05-22-2006, 10:27 PM
ooo - you little tease EC :p

chris_bcn
05-22-2006, 10:37 PM
Damn - that "solution" has all kinds of nasty side effects. Back to the drawing board then

chris_bcn
05-23-2006, 04:18 PM
in case anyone else runs into this problem - the filter solution doesn't like relative paths - if you make it absolute then it works like a charm. Except your CSS won't validate, but then bung 'em in conditional comments.

EC
05-23-2006, 04:39 PM
Chris if you wanna email me I'll write up this example from Andy Budd. He does mention something about the css not validating though so maybe it's the same solution.