using PNG images in IE

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

using PNG images in IE

Post by kendall »

Hello,

I am trying to create transparent images that i can use with different colour backgrounds. Now the obvious would be to use gif but trying to get gif images with a "smooth" edge while remaining transparent is not working to well. I am using FIREWORKS and PNG32 seems to just the right thing. The problem is that in IE png32 images are showing up with a grey background while in FIREFOX it shows up correctly.

Can any one recommend me a suitable workaround for this?

Kendall
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Post by kendall »

User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

http://www.google.com

I win, because Google has a pagerank of 10 :)

Hurray! ;)
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

This should do the trick:

Code: Select all

$client = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
  header("Location: http://www.getfirefox.com");
}
if(strstr($client,"MSIE"))
{
header("Location: http://www.getfirefox.com");
}
quote;))
{
header("Location: http://www.getfirefox.com");
}
t = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
header("Location: http://www.getfirefox.com");
}
trick:

Code: Select all

$client = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
  header("Location: http://www.getfirefox.com");
}
trick:

Code: Select all

$client = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
  header("Location: http://www.getfirefox.com");
}
lient,"MSIE"))
{
header("Location: http://www.getfirefox.com");
}
uote;))
{
header("Location: http://www.getfirefox.com&quote;);
}
1dd7ffe3d7]
$client = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE&quote;))
{
header(&quote;Location: http://www.getfirefox.com&quote;);
}
SERVER['HTTP_USER_AGENT'];

if(strstr($client,&quote;MSIE&quote;))
{
header(&quote;Location: http://www.getfirefox.com&quote;);
}
r("Location: http://www.getfirefox.com");
}
R_AGENT'];

if(strstr($client,"MSIE"))
{
heade trick:

Code: Select all

$client = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
  header("Location: http://www.getfirefox.com");
}
'HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
header("Location: http://www.getfirefox.com");
}
trick:

Code: Select all

$client = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
  header("Location: http://www.getfirefox.com");
}
$client = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
header("Location: http://www.getfirefox.com");
}
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

pickle wrote:This should do the trick:

Code: Select all

$client = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
  header("Location: http://www.getfirefox.com");
}
LOL... Handy to know :P1111;'HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
header("Location: http://www.getfirefox.com");
}
[/quote]

LOL... Handy to know :Pandy to know :Pclient,"MSIE"))
{
header("Location: http://www.getfirefox.com");
}
[/quote]

LOL... Handy to know :P

Code: Select all

$client = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
  header("Location: http://www.getfirefox.com");
}
[/quote]

LOL... Handy to know :P"pickle"]This should do the trick:

Code: Select all

$client = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
  header("Location: http://www.getfirefox.com");
}
[/quote]

LOL"pickle"]This should do the trick:

Code: Select all

$client = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
  header("Location: http://www.getfirefox.com");
}
[/quote]

LOL... Handy to know :PER_AGENT'];

if(strstr($client,"MSIE"))
{
header("Location: http://www.getfirefox.com");
}
[/quote]

LOL... Handy to know :Plient,"MSIE"))
{
header("Location: http://www.getfirefox.com&quote;);
}
[/quote]

LOL... Handy to know :Pld do the trick:

Code: Select all

$client = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
  header("Location: http://www.getfirefox.com");
}
[/quote]

LOL... Handy to know :P1]
$client = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,&quote;MSIE&quote;))
{
header(&quote;Location: http://www.getfirefox.com&quote;);
}
[/quote]

LOL... Handy to know :PIE"))
{
header("Location: http://www.getfirefox.com");
}
[/quot = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE&quote;))
{
"pickle"]This should do the trick:

Code: Select all

$client = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
  header("Location: http://www.getfirefox.com");
}
[/quote]

LOL... Handy to know :P
$client = $_SERVER['HTTP_USER_AGENT'];

if(strstr($client,"MSIE"))
{
header("Location: http://www.getfirefox.com");
}
[/quote]

LOL... Handy to know :P
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

http://koivi.com/ie-png-transparency/ has an excellent explanation of the problem, the cause (IE doesn't do png alpha transparency correctly), and mentions a solid php solution to the issue.

Another poster mentioned Sleight, which I personally think is a better solution because its mostly js-oriented.

There are numerous other solutions to the problem, just google IE png transparency, and you'll find plenty.

IE7 apparently fixes the problem: http://blogs.msdn.com/ie/archive/2005/04/22/410963.aspx , so we can all look forward to helping extend Microsoft's monopoly by encouraging users to upgrade their OS to get a working browser. ;)

Of course, you could just tell them to get Firefox.
theda
Forum Contributor
Posts: 332
Joined: Sat Feb 19, 2005 8:35 am
Location: USA

Post by theda »

IE7 actually should be out for free for older systems (Probably just XP)
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

theda wrote:IE7 actually should be out for free for older systems (Probably just XP)
IE7 isn't even out of beta yet. IE6 is the latest version of IE.

IE7 will only be available on Longhorn, according to the last reports from Microsoft, although they may change their mind before release.
AngusL
Forum Contributor
Posts: 155
Joined: Fri Aug 20, 2004 4:28 am
Location: Falkirk, Scotland

Post by AngusL »

IE7 Beta last time I checked only ran on XP SP2.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

AngusL wrote:IE7 Beta last time I checked only ran on XP SP2.
The first betas are in Longhorn, and I just found an article where they did in fact commit to IE7 on XP. However, No IE7 on win2k.
theda
Forum Contributor
Posts: 332
Joined: Sat Feb 19, 2005 8:35 am
Location: USA

Post by theda »

Which means, yay for me, boo for you! :)
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

theda wrote:Which means, yay for me, boo for you! :)
If you wanna quibble, in fact you said it "should be out", and its not out yet.

I'd call it a tie. :P
theda
Forum Contributor
Posts: 332
Joined: Sat Feb 19, 2005 8:35 am
Location: USA

Post by theda »

Note: Should. Not would. Difference there buddy. A belief is different than a fact :). +1 For the home team. :twisted:
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

theda wrote:Note: Should. Not would. Difference there buddy. A belief is different than a fact :). +1 For the home team. :twisted:
The phrasing was definitely ambiguous. If I said the batman DVD should be out, that would usually lead you to believe you could go buy it today - not in the future.

Thats the meaning I took it at.
Post Reply