<?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>Mitch Canter is [studionashvegas] &#187; JavaScript</title>
	<atom:link href="http://www.studionashvegas.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.studionashvegas.com</link>
	<description>&#124; Nashville&#039;s Best WordPress Design, Web Development, and Marketing</description>
	<lastBuildDate>Sun, 20 Jun 2010 21:04:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Transparent PNG in IE6 &#8211; JavaScript</title>
		<link>http://www.studionashvegas.com/old-posts/transparent-png-in-ie6-javascript/</link>
		<comments>http://www.studionashvegas.com/old-posts/transparent-png-in-ie6-javascript/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 16:00:03 +0000</pubDate>
		<dc:creator>studionashvegas</dc:creator>
				<category><![CDATA[Old Posts]]></category>
		<category><![CDATA[Alpha]]></category>
		<category><![CDATA[Fix]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PNG]]></category>

		<guid isPermaLink="false">http://www.studionashvegas.com/?p=113</guid>
		<description><![CDATA[There are a lot of fixes for Alpha PNG transparancy in Internet Explorer 6.  They all have their pros and cons, but I love this one because (unlike some other fixes) it covers every image at once.  That way, you can put in a lot of transparent images and get a massive fix for all. [...]]]></description>
			<content:encoded><![CDATA[<p>There are a lot of fixes for Alpha PNG transparancy in Internet Explorer 6.  They all have their pros and cons, but I love this one because (unlike some other fixes) it covers every image at once.  That way, you can put in a lot of transparent images and get a massive fix for all.</p>
<pre style="padding-left: 30px;">&lt;!--[if gte IE 5.5000]&gt;
&lt;script language="JavaScript"&gt;
function correctPNG()
{
   for(var i=0; i&lt;document.images.length; i++)
   {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()

      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
      {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText

         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle

         var strNewHTML = "&lt;span " + imgID + imgClass + imgTitle
             + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;"
             + imgStyle + ";"      + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
             + "(src=\'" + img.src + "\', sizingMethod='scale');\"&gt;&lt;/span&gt;"

         img.outerHTML = strNewHTML
         i = i-1
      }
   }
}
window.attachEvent("onload", correctPNG);
&lt;/script&gt;
&lt;![endif]--&gt;</pre>
<p>The only downside: any transparent parts of the image will not be clickable for hyperlink purposes.  If you have a white logo on a transparent background, for example, you can only click on the white parts, and not the image as a whole.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.studionashvegas.com/old-posts/transparent-png-in-ie6-javascript/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.studionashvegas.com/old-posts/transparent-png-in-ie6-javascript/&amp;title=Transparent+PNG+in+IE6+-+JavaScript" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.studionashvegas.com/old-posts/transparent-png-in-ie6-javascript/&amp;title=Transparent+PNG+in+IE6+-+JavaScript" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.studionashvegas.com/old-posts/transparent-png-in-ie6-javascript/&amp;t=Transparent+PNG+in+IE6+-+JavaScript" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.friendfeed.com/share?title=Transparent+PNG+in+IE6+-+JavaScript&amp;link=http://www.studionashvegas.com/old-posts/transparent-png-in-ie6-javascript/" rel="nofollow" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.studionashvegas.com/old-posts/transparent-png-in-ie6-javascript/&amp;imageurl=" rel="nofollow" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.studionashvegas.com/old-posts/transparent-png-in-ie6-javascript/&amp;title=Transparent+PNG+in+IE6+-+JavaScript" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.studionashvegas.com/old-posts/transparent-png-in-ie6-javascript/&amp;title=Transparent+PNG+in+IE6+-+JavaScript" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.studionashvegas.com/old-posts/transparent-png-in-ie6-javascript/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-tumblr">
			<a href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.studionashvegas.com%2Fold-posts%2Ftransparent-png-in-ie6-javascript%2F&amp;t=Transparent+PNG+in+IE6+-+JavaScript" rel="nofollow" title="Share this on Tumblr">Share this on Tumblr</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Transparent+PNG+in+IE6+-+JavaScript+-+http://b2l.me/5t8xr&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

<div class="facebook_like_button"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.studionashvegas.com%2Fold-posts%2Ftransparent-png-in-ie6-javascript%2F&amp;layout=standard&amp;show-faces=true&amp;width=600&amp;action=recommend&amp;font=verdana&amp;colorscheme=dark" scrolling="no" frameborder="0" allowTransparency="true" style="padding: 0px 0px; border:none; overflow:hidden; width:600px; height:70px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://www.studionashvegas.com/old-posts/transparent-png-in-ie6-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
