<?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>eggBlog &#187; Javascript</title>
	<atom:link href="http://www.eggchops.com/category/web-stuff/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eggchops.com</link>
	<description>The noble ramblings of an eggChop</description>
	<lastBuildDate>Mon, 12 Jul 2010 13:07:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PNG fix for IE6</title>
		<link>http://www.eggchops.com/web-stuff/websites/png-fix-for-ie6/</link>
		<comments>http://www.eggchops.com/web-stuff/websites/png-fix-for-ie6/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 19:27:59 +0000</pubDate>
		<dc:creator>eggChops</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.eggchops.com/?p=190</guid>
		<description><![CDATA[For a long time I have been bothered by the fact that to getting a nice transparent effect on PNGs working in IE6 doesn&#8217;t work. It leaves a nasty grey background to the image where in Firefox you would see through to the background.
Recently after a quick search around, I found a solution to all [...]]]></description>
			<content:encoded><![CDATA[<p>For a long time I have been bothered by the fact that to getting a nice transparent effect on PNGs working in IE6 doesn&#8217;t work. It leaves a nasty grey background to the image where in Firefox you would see through to the background.<br />
Recently after a quick search around, I found a solution to all my problems in the form of a PNG fix. I wanted to use PNGs to create image links on a site. Having one that I could overlay on differing backgrounds was going to be a bonus and would save a lot of time. The design also had a dropdwon menu with a transparent gradient on it. It needed to work in all browsers as this was part of the specification, so I started searching Google for answers.<br />
The very first thing that came up in my search seemed to have the answer I needed. A javascript file that sorted the probelm for me.</p>
<p>The site I got the fix from is <a href="http://homepage.ntlworld.com/bobosola/" target="_blank">http://homepage.ntlworld.com/bobosola/</a> and is worth checking out for more detail. I&#8217;ll briefly run through how to use the fix.</p>
<p>The main advantage of using PNGs is to get the alpha transparency going. There is also the option of two-dimensional interlacing which produces profressive display.<br />
Adavantages of using a GIF are that they are more widelysupported. It also supports animation and everbody loves animated GIFs&#8230;.right? <img src='http://www.eggchops.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote><p>1. Download the png_fix file that can be found <a href="http://www.eggchops.com/wp-content/uploads/pngfix.js">here</a>.<br />
2. Insert the code below into the page you want the PNGs fixing.<br />
&lt;!&#8211;[if IE 6]&gt;<br />
&lt;script type=&#8221;text/javascript&#8221; src=&#8221;pngfix.js&#8221;&gt;&lt;/script&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
DD_belatedPNG.fix(&#8217;.png_bg&#8217;);<br />
&lt;/script&gt;<br />
&lt;![endif]&#8211;&gt;<br />
You can name the class inside the function call anything you like.<br />
3. Then simple apply the class &#8216;png_bg&#8217; to the element you want the transparency to work on. For example on an image &lt;img src=&#8217;image.png&#8217; alt=&#8221; class=&#8217;png_bg&#8217; /&gt;</p></blockquote>
<p>An example of the menu I did with the PNG fix can be found <a href="http://eggchops.com/pngfix_example/">here</a> on a work in progress site we are doing at 9xb. If you hover over &#8216;Venues&#8217; in the main menu, you will see the dropdown in action. It also uses the fix on the semi-transparent overlay in the main box and on a few PNGs throughout.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eggchops.com/web-stuff/websites/png-fix-for-ie6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
