<p>Our (beloved) designer keeps creating PNG files with transparent backgrounds for use in our applications. I'd like to make sure that this feature of the PNG works in "older" browsers as well. What's the best solution?</p>

<p><em>edits below</em></p>

<p>@mabwi &amp; @syd - Whether or not I agree about the use of a PNG is not the point. This is a problem that I need to solve!</p>

<p>@Tim Sullivan - IE7.js looks pretty cool, but I don't think I want to introduce all of the other changes an application. I'd like a solution that fixes the PNG issue exclusively. Thanks for the link.</p>

[{'answer_id': 10251, 'author': 'MattBelanger', 'author_id': 655, 'author_profile': 'https://Stackoverflow.com/users/655', 'pm_score': -1, 'selected': False, 'text': '<p>I might be mistaken, but I\'m pretty sure IE6 and less just don\'t do transparency with PNG files.</p>\n\n<p>I have two "solutions" that I use.  Either create GIF files with transparency and use those everywhere, or just use them for IE 6 and older with conditional style sheets.  The second really only works if you are using them as backgrounds, etc.</p>\n'}, {'answer_id': 10252, 'author': 'Tim Sullivan', 'author_id': 722, 'author_profile': 'https://Stackoverflow.com/users/722', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://code.google.com/p/ie7-js/" rel="nofollow noreferrer">IE7.js</a> will provide support for PNGs (including transparency) in IE6.</p>\n'}, {'answer_id': 10289, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>I believe all browsers support PNG-8.  Its not alpha blended, but it does have transparent backgrounds.</p>\n'}, {'answer_id': 10346, 'author': 'Ian Robinson', 'author_id': 326, 'author_profile': 'https://Stackoverflow.com/users/326', 'pm_score': 3, 'selected': False, 'text': '<p>I\'ve found what looks to be a very good solution here: <a href="http://web.archive.org/web/20170521133429/http://labs.unitinteractive.com:80/unitpngfix.php" rel="nofollow noreferrer">Unit Interactive -&gt; Labs -&gt; Unit PNG Fix</a></p>\n<p><em>update</em> Unit PNG is also featured on a <a href="http://nettuts.com/videos/screencasts/5-easy-ways-to-tackle-ie6s-transparency-issues/" rel="nofollow noreferrer">list of PNG fix options on NETTUTS</a></p>\n<p>Here are the highlights from their website:</p>\n<ul>\n<li>Very compact javascript: Under 1kb!</li>\n<li>Fixes some interactivity problems caused by IE’s filter\nattribute.</li>\n<li>Works on img objects and background-image attributes.</li>\n<li>Runs automatically. You don’t have to define classes or call\nfunctions.</li>\n<li>Allows for auto width and auto height elements.</li>\n<li>Super simple to deploy.</li>\n</ul>\n'}, {'answer_id': 10464, 'author': 'Orion Edwards', 'author_id': 234, 'author_profile': 'https://Stackoverflow.com/users/234', 'pm_score': 0, 'selected': False, 'text': "<blockquote>\n  <p>I might be mistaken, but I'm pretty sure IE6 and less just don't do transparency with PNG files.</p>\n</blockquote>\n\n<p>You sort of are, and you sort of aren't.</p>\n\n<p>IE6 has no support natively for them.</p>\n\n<p>However, IE has support for crazy custom javascript/css and COM objects (which is how they originally implemented XmlHttpRequest)</p>\n\n<p>All of these hacks basically do this:</p>\n\n<ul>\n<li>Find all the png images</li>\n<li>Use a directx image filter to load them and produce a transparent image in some kind of format IE understands</li>\n<li>Replace the images with the filtered copy.</li>\n</ul>\n"}, {'answer_id': 10476, 'author': 'Lance Fisher', 'author_id': 571, 'author_profile': 'https://Stackoverflow.com/users/571', 'pm_score': 2, 'selected': False, 'text': '<p>I\'ve messed with trying to make a site with .pngs and it just isn\'t worth it.  The site becomes slow, and you use hacks that don\'t work 100%.  Here\'s a <a href="http://24ways.org/2007/supersleight-transparent-png-in-ie6" rel="nofollow noreferrer">good article on some options</a>, but my advice is to find a way to make gifs work until you don\'t have to support IE6.  Or just give IE6 a degraded experience.</p>\n'}, {'answer_id': 92530, 'author': 'hugoware', 'author_id': 17091, 'author_profile': 'https://Stackoverflow.com/users/17091', 'pm_score': 2, 'selected': False, 'text': '<p>Using PNGs in IE6 is hardly any more difficult than any other browser. You can support all of it in your CSS without Javascript. I\'ve seen this hack shown before...</p>\n\n<pre><code>div.theImage {\n    background  : url(smile.png) top left no-repeat;\n    height      : 100px;\n    width       : 100px;\n}\n\n* html div.theImage {\n    background  : none;     \n    progid:DXImageTransform.Microsoft.AlphaImageLoader(src="layout/smile.png", sizingMethod="scale");\n}\n</code></pre>\n\n<p>I\'m not so sure this is valid CSS, but depending on the site, it may not matter so much.</p>\n\n<p>(it\'s worth noting that the URL for the first image is based on the directory of the stylesheet, where the second is based on the directory of the page being viewed - thus why they do not match)</p>\n'}, {'answer_id': 92743, 'author': 'nickf', 'author_id': 9021, 'author_profile': 'https://Stackoverflow.com/users/9021', 'pm_score': 2, 'selected': False, 'text': "<p>@Hboss</p>\n\n<p>that's all fine and dandy if you know exactly all the files (and the dimensions of each) that you're going to be displaying - it'd be a royal pain to maintain that CSS file, but I suppose it'd be possible. When you want to start using transparent PNGs for some very common purposes: a) incidental graphics such as icons (perhaps of differing size) which work on any background, and b) repeating backgrounds; then you're screwed. Every workaround I've tried has hit a stumbling block at some point (can't select text when the background is transparent, <em>sometimes</em> the images are displayed at wacky sizes, etc etc), and I've found that for maximum reliability I'll have to revert to gifs.</p>\n\n<p>My advice is to give the PNG transparency hack a shot, but at the same time realise that it's definitely not perfect - and just remember, you're bending over backwards for users of <strong>a browser which is over 7 years old</strong>. What I do these days is give IE6 users a popup on their first visit to the site, with a friendly reminder that their browser is outdated and doesn't offer the features required by modern websites, and, though we'll try our best to give you the best, you'll get a better experience from our site and the internet as a whole if you BLOODY WELL UPGRADED.</p>\n"}, {'answer_id': 479890, 'author': 'Kornel', 'author_id': 27009, 'author_profile': 'https://Stackoverflow.com/users/27009', 'pm_score': 3, 'selected': False, 'text': '<ul>\n<li><a href="http://www.twinhelix.com/css/iepngfix/" rel="nofollow noreferrer">IE PNG Fix 2.0</a> which supports <code>background-position</code> and <code>-repeat</code>!</li>\n</ul>\n\n<p>Also paletted 8-bit PNG with <em>full alpha transparency</em> exist, contrary to what Photoshop and GIMP may make you believe, and they degrade better in IE6 – it just cuts down transparency to 1-bit. Use <a href="http://pngquant.org/" rel="nofollow noreferrer">pngquant</a> to generate such files from 24-bit PNGs.</p>\n'}, {'answer_id': 584106, 'author': 'Glen Lipka', 'author_id': 29687, 'author_profile': 'https://Stackoverflow.com/users/29687', 'pm_score': 0, 'selected': False, 'text': '<p>One thing to think about is Email clients.  You often want PNG-24 transparency but in Outlook 2003 with a machine using IE6.  Email clients won\'t allow CSS or JS tricks.</p>\n\n<p>Here is a good way to handle that.\n<a href="http://commadot.com/png-8-that-acts-like-png-24-without-fireworks/" rel="nofollow noreferrer">http://commadot.com/png-8-that-acts-like-png-24-without-fireworks/</a></p>\n'}, {'answer_id': 730288, 'author': 'Tom', 'author_id': 45350, 'author_profile': 'https://Stackoverflow.com/users/45350', 'pm_score': 0, 'selected': False, 'text': "<p>If you export your images as PNG-8 from Fireworks then they'll act the same as gif images. So they won't look shitty and grey, transparency will be transparency but they won't have the full 24 bit loveliness that other browsers do. </p>\n\n<p>Might not totally solve your problem but at least you can get part way there just be re-exporting them.</p>\n"}]
['https://Stackoverflow.com/questions/10243', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/326/']