<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Noted Path by Theodore Nguyen-Cao &#187; css</title>
	<atom:link href="http://www.theodorenguyen-cao.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theodorenguyen-cao.com</link>
	<description>Personal blog of Theodore Nguyen-Cao</description>
	<lastBuildDate>Fri, 20 May 2011 12:43:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>2 ways to fix transparent PNG files in IE6</title>
		<link>http://www.theodorenguyen-cao.com/2008/11/09/2-ways-to-fix-transparent-png-files-in-ie6/</link>
		<comments>http://www.theodorenguyen-cao.com/2008/11/09/2-ways-to-fix-transparent-png-files-in-ie6/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 23:51:15 +0000</pubDate>
		<dc:creator>Theo</dc:creator>
				<category><![CDATA[geekery]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[how-to]]></category>

		<guid isPermaLink="false">http://www.theodorenguyen-cao.com/?p=139</guid>
		<description><![CDATA[I fired up Photoshop for the first time in a long time. I created a transparent PNG for an image that would be used as a CSS background-image. It keeps displaying with a gray background even though the page background color was something else. This is a pretty well documented bug. Luckily, there are a [...]]]></description>
			<content:encoded><![CDATA[<p>I fired up Photoshop for the first time in a long time.  I created a transparent PNG for an image that would be used as a CSS background-image.  It keeps displaying with a gray background even though the page background color was something else.</p>
<p>This is a pretty well documented <a href="http://support.microsoft.com/kb/294714">bug</a>. Luckily, there are a couple of ways to fix this.  </p>
<p>Here are my two favorites:</p>
<p>The first solution is well documented:</p>
<p>Download <a href="http://www.twinhelix.com/css/iepngfix/">iepngfix.zip</a>. The development version 2.0 Alpha 3 has support for background position and repeat.  Extract the zip and copy  <code>iepngfix.htc</code> and <code>blank.gif</code> somewhere.  I put in under <code>stylesheets</code>.</p>
<p>Add the following snippet to your CSS stylesheet:</p>
<pre name="code" class="css">
img {
	behavior: url(/stylesheets/iepngfix.htc);
}
</pre>
<p>And you&#8217;re done! Hit refresh in IE6 and transparent PNG images should render correctly now.</p>
<p>You can add apply this fix to other elements that may be using PNG images as CSS background images as such:</p>
<pre name="code" class="css">
img, #logo {
	behavior: url(/stylesheets/iepngfix.htc);
}
</pre>
<p>where logo is a div that has a background-image that is a transparent PNG.</p>
<p>Note: If you are using v2.0 and want to take advantage of background-repeat and position support, copy <code>iepngfix_tilebg.js</code> to your javascripts folder and include the js file in the HTML files you need it for.</p>
<p>The second way to fix this is to <a href="http://www.stopie6.org/">get everyone off IE6</a> but I guess that&#8217;s just wishful thinking&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theodorenguyen-cao.com/2008/11/09/2-ways-to-fix-transparent-png-files-in-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

