Forums / Templates, Stylesheets, Page Layout / Remove grey Background from Transparent PNG in IE.

Remove grey Background from Transparent PNG in IE.

Locked

Views: 2,649

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
27 Dec 2009, 6:11 AM
#1
dimascus avatar

dimascus

New Zenner

Join Date:
Jan 2009
Posts:
24
Plugin Contributions:
0

Remove grey Background from Transparent PNG in IE.

I have been looking for a while now. I can not find this solution.

I know that:

<DIV ID="oDiv" STYLE="position:absolute; left:140px; height:400; width:400;
     filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
     src='image.png', sizingMethod='scale');" >
</DIV>

Should work. But, where would I input that code? I just cant seem to find a place to put this... Or, is there an even easier way to make my PNGs show no background and full transparent in IE?

Some PNGs have no BG in them and som do on my site... What is wrong?

Thanks,

-Alex

27 Dec 2009, 1:20 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Remove grey Background from Transparent PNG in IE.

To get that styling into an already existing element with an id="oDiv", you would put a new rule in your stylesheet:```
#oDiv {
position:absolute;
left:140px;
height:400;
width:400;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image.png', sizingMethod='scale');
}

Assuming that the filter code will actually do what you want.


If the div does not yet exist, add to the HTML code in the relevant PHP file```
<div id="oDiv">
<!-- your new content -->
</div>
27 Dec 2009, 7:12 PM
#3
dimascus avatar

dimascus

New Zenner

Join Date:
Jan 2009
Posts:
24
Plugin Contributions:
0

Re: Remove grey Background from Transparent PNG in IE.

Hmmm... thanks for the help. Still not working. I wish IE just worked right... lol

Any other ideas maybe you could share with me?

Thanks for your help so far! :D

27 Dec 2009, 8:53 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Remove grey Background from Transparent PNG in IE.

I'm taking your word about the proprietary Microsoft styling "filter" property, as I know nothing about that. It would help to know more about what you are trying to accomplish - is the png a background image? Is that styling supposed to affect a foreground content image? What exactly did you end up doing, in the context of the file, and which file? A link to see your site may be useful for those who use png images to diagnose.