Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Transparent PNG not showing up in IE [works in Netscape]
Old 06-21-2006, 05:03 PM Transparent PNG not showing up in IE [works in Netscape]
Experienced Talker

Posts: 39
Trades: 0
Hello,

Has anyone else run into this problem? I see the graphic but, in IE, the transparent part is grey. I've found a resource that has proper code,
AlphaImageLoader
but I guess my problem is that my image is a background image. I can't seem to make this code work.

I also found code at another site:
<html>
<head></head>
<body bgColor="blue">
<!-- This DIV is the target container for the image. -->
<DIV ID="oDiv" STYLE="position:absolute; left:140px; height:400; width:400;
filterrogidXImageTransform.Microsoft.AlphaImag eLoader(
src='image.png', sizingMethod='scale');" >
</DIV>
</body>
</html>
and again, I don't know how to alter it to accomodate a background graphic.

Any advice?
Thanks in advance
b4b
__________________
The truth is more important than the facts. Frank Lloyd Wright
__________________________________________________ _________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
byte4byte is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-21-2006, 05:05 PM Re: Transparent PNG not showing up in IE [works in Netscape]
Experienced Talker

Posts: 39
Trades: 0
by the way, 'just want to let you know I didn't put the emoticons in the above post... in case it's a site problem...
__________________
The truth is more important than the facts. Frank Lloyd Wright
__________________________________________________ _________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
byte4byte is offline
Reply With Quote
View Public Profile
 
Old 06-21-2006, 05:15 PM Re: Transparent PNG not showing up in IE [works in Netscape]
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
IE 6 (and below) does NOT support PNG transparency. IE 7, it appears, will.

You might try this article: http://www.alistapart.com/stories/pngopacity/
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-21-2006, 06:30 PM Re: Transparent PNG not showing up in IE [works in Netscape]
Experienced Talker

Posts: 39
Trades: 0
Thanks LadynRed... I'll let you know how it goes.
__________________
The truth is more important than the facts. Frank Lloyd Wright
__________________________________________________ _________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
byte4byte is offline
Reply With Quote
View Public Profile
 
Old 06-22-2006, 04:50 AM Re: Transparent PNG not showing up in IE [works in Netscape]
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Look for a script called Sleight. I use it on www.inoxia.co.uk to make transparent PNGs work properly.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 06-22-2006, 09:03 AM Re: Transparent PNG not showing up in IE [works in Netscape]
scottfree's Avatar
Extreme Talker

Posts: 234
Location: Hamburg
Trades: 0
Just a suggestion.
Why not change the image into a gif, that's been supported all along.
__________________
I think, therefore I am..... I think.
scottfree is offline
Reply With Quote
View Public Profile Visit scottfree's homepage!
 
Old 06-22-2006, 09:13 AM Re: Transparent PNG not showing up in IE [works in Netscape]
Experienced Talker

Posts: 39
Trades: 0
Thanks Minaki, I checked out your link and the Sleight, but i don't know what is even supposed to go into a .js file... I need to do more research.

Scottfree, I would do that except I have a background image [Image1] of a lined object in a cell [no problem there], but then I have another partly transparent image [transparent in order to see the lined object below] [Image2] placed as a background image in a nested cell . Image 2 needs to be a background image because I need a text box placed in that same cell. My problem is I can't seem to find code for PNG's that relate to a backround image... but I'm still searchin through all the info you've all provided; thanks again!
__________________
The truth is more important than the facts. Frank Lloyd Wright
__________________________________________________ _________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
byte4byte is offline
Reply With Quote
View Public Profile
 
Old 06-22-2006, 06:36 PM Re: Transparent PNG not showing up in IE [works in Netscape]
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
Quote:
Originally Posted by scottfree
Just a suggestion.
Why not change the image into a gif, that's been supported all along.
GIF's only support one single channel of transparency, while PNG's support true alpha channel for gradient transparency. (8-bit I think)
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 06-23-2006, 09:38 AM Re: Transparent PNG not showing up in IE [works in Netscape]
Experienced Talker

Posts: 39
Trades: 0
Hello all,

Well, I couldn't figure it out, so I revised the layout of the site. Once the site is launched I'll post the url.

Thanks again for all your help!
__________________
The truth is more important than the facts. Frank Lloyd Wright
__________________________________________________ _________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
byte4byte is offline
Reply With Quote
View Public Profile
 
Old 07-19-2006, 07:19 AM Re: Transparent PNG not showing up in IE [works in Netscape]
Experienced Talker

Posts: 39
Trades: 0
Hello again... Here's the site. I built it without the transparent png; there wasn't enough time to figure it out and test it. But thank you so much for all your help.
__________________
The truth is more important than the facts. Frank Lloyd Wright
__________________________________________________ _________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
byte4byte is offline
Reply With Quote
View Public Profile
 
Old 03-05-2008, 09:11 AM Re: Transparent PNG not showing up in IE [works in Netscape]
Extreme Talker

Posts: 246
Trades: 3
I was having the same problem. The sleight.js script was the perfect solution for me. In case you are not sure how to implement it, here's what I did:
  1. I just put this code into a text file, and named it sleight.js:
    Code:
    if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
    	document.writeln('<style type="text/css">img, input.PngInput { visibility:hidden; } </style>');
    	window.attachEvent("onload", fnLoadPngs);
    }
    
    function fnLoadPngs() {
    	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
    	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
    
    	for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) {
    		if (itsAllGood && img.src.match(/\.png$/i) != null) {
    			fnFixPng(img);
    			img.attachEvent("onpropertychange", fnPropertyChanged);
    		}
    		img.style.visibility = "visible";
    	}
    
    	var nl = document.getElementsByTagName("INPUT");
    	for (var i = nl.length - 1, e = null; (e = nl[i]); i--) {
    		if (e.className && e.className.match(/\bPngInput\b/i) != null) {
    			if (e.src.match(/\.png$/i) != null) {
    				fnFixPng(e);
    				e.attachEvent("onpropertychange", fnPropertyChanged);
    			}
    			e.style.visibility = "visible";
    		}
    	}
    }
    
    function fnPropertyChanged() {
    	if (window.event.propertyName == "src") {
    		var el = window.event.srcElement;
    		if (!el.src.match(/x\.gif$/i)) {
    			el.filters.item(0).src = el.src;
    			el.src = "x.gif";
    		}
    	}
    }
    
    function dbg(o) {
    	var s = "";
    	var i = 0;
    	for (var p in o) {
    		s += p + ": " + o[p] + "\n";
    		if (++i % 10 == 0) {
    			alert(s);
    			s = "";
    		}
    	}
    	alert(s);
    }
    
    function fnFixPng(img) {
    	var src = img.src;
    	img.style.width = img.width + "px";
    	img.style.height = img.height + "px";
    	img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"
    	img.src = "/images/x.gif";
    }
  2. Then I added the following line to my HTML:
    HTML Code:
    <script type="text/javascript" src="sleight.js"></script>
  3. Finally, I put a 1-pixel transparent GIF file named x.gif into a subdirectory named images.
That's all it took to fix it. Thanks for your help!
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
CouponGuy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Transparent PNG not showing up in IE [works in Netscape]
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.31628 seconds with 12 queries