<?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>Illuminati Karate Blog &#187; CSS</title>
	<atom:link href="http://illuminatikarate.com/blog/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://illuminatikarate.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 31 Mar 2010 14:12:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A Dead-Simple PNG Fix For Internet Explorer 6 (IE6)</title>
		<link>http://illuminatikarate.com/blog/a-dead-simple-png-fix-for-internet-explorer-6-ie6/</link>
		<comments>http://illuminatikarate.com/blog/a-dead-simple-png-fix-for-internet-explorer-6-ie6/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 05:04:34 +0000</pubDate>
		<dc:creator>George Huger</dc:creator>
				<category><![CDATA[Browser Testing]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://illuminatikarate.com/blog/?p=339</guid>
		<description><![CDATA[As you know, IE6 does not render transparent PNGs appropriately by default. We can work around it using IE&#8217;s proprietary expression CSS property, and there are myriad libraries available to make this easier. However most approaches usually involve creating a separate CSS file for IE6, and most don&#8217;t support repeating background images (via the background-repeat [...]]]></description>
			<content:encoded><![CDATA[<p>As you know, IE6 does not render transparent PNGs appropriately by default. We can work around it using IE&#8217;s proprietary expression CSS property, and there are myriad libraries available to make this easier. However most approaches usually involve creating a separate CSS file for IE6, and most don&#8217;t support repeating background images (via the background-repeat CSS property).</p>
<p>We recently stumbled into Drew Diller&#8217;s <a href="http://www.dillerdesign.com/experiment/DD_belatedPNG/">belated PNG fix for IE6</a>, which is the simplest implementation so far, and fully supports repeating background images. All that&#8217;s needed is to include a Javascript file and pass an appropriate CSS selector to the library&#8217;s fix() function, and the library handles the rest.</p>
<p>The following code will implement the PNG fix for all elements with the class &#8220;png_fix&#8221;, using the DD_belatedPNG library. Its wrapped in <a href="http://www.quirksmode.org/css/condcom.html">conditional comments</a> so that only IE6 will include the script:</p>

<div class="wp_codebox"><table width="100%" ><tr id="p3392"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p339code2"><pre class="html" style="font-family:monospace;">&lt;!--[if IE 6]&gt;
&lt;script src=&quot;/js/DD_belatedPNG.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
  DD_belatedPNG.fix('.fix_png');
&lt;/script&gt;
&lt;![endif]--&gt;</pre></td></tr></table></div>

<p><em>Note: its important that you leave the script include and the call to fix() in seperate script elements. If you combine them into one, the fix will not work.</em></p>
<p>The above code can be adapted for nearly all use cases, but there are a couple of known issues that you should be aware of:</p>
<ul class="numbered">
<li>The fix will not work on the &lt;body&gt; tag. If you need to use a PNG on the body tag, just add an extra container div and apply the PNG background and fix to it instead.</li>
<li>&lt;tr&gt; and &lt;td&gt; elements are not supported. This is unsurprising, as these elements already behave strangely with background images in many browsers, especially &lt;tr&gt;&#8217;s.</li>
<li>&lt;input type=&#8221;image&#8221;/&gt; elements are not supported. Use a &lt;button&gt; element instead.</li>
</ul>
<p>We&#8217;ve used this library in several live projects, and its worked wonderfully. Hopefully it will save you some time and headaches too.</p>
]]></content:encoded>
			<wfw:commentRss>http://illuminatikarate.com/blog/a-dead-simple-png-fix-for-internet-explorer-6-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
