<?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>Michael Hartmayer - Portfolio &#187; ie6</title>
	<atom:link href="http://www.michaelhartmayer.com/tag/ie6/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michaelhartmayer.com</link>
	<description>Have a Leet Smoothy</description>
	<lastBuildDate>Wed, 21 Jul 2010 04:04:47 +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>IE6 / IE7 jQuery Fix: Anchor Image Clickable Area</title>
		<link>http://www.michaelhartmayer.com/web-design/ie6-ie7-jquery-fix-anchor-image-clickable-area/</link>
		<comments>http://www.michaelhartmayer.com/web-design/ie6-ie7-jquery-fix-anchor-image-clickable-area/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 18:45:31 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[ie7]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=396</guid>
		<description><![CDATA[IE6 and IE7 both experience a problem in which images inside of block elements inside of anchors lose their click ability. Here&#8217;s an example: &#60;a href=&#34;rss-icon.png&#34;&#62; &#60;span style=&#34;display:block; width:100px; height:100px;&#34;&#62; &#60;img src=&#34;someImage.png&#34; /&#62; &#60;/span&#62; &#60;/a&#62; Every area of the link remains click-able except for the surface consumed by someImage.png. (Note, this problem will not show [...]]]></description>
			<content:encoded><![CDATA[<p>IE6 and IE7 both experience a problem in which images inside of block elements inside of anchors lose their click ability. Here&#8217;s an example:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;rss-icon.png&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;span</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;display:block; width:100px; height:100px;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;img</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;someImage.png&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Every area of the link remains click-able except for the surface consumed by someImage.png. (Note, this problem will not show in IE8, or FF)</p>
<p>Here&#8217;s a very small jQuery plugin I wrote to fix this particular issue.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$.<span style="color: #660066;">fn</span>.<span style="color: #660066;">fixClick</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>
				.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>cursor<span style="color: #339933;">:</span><span style="color: #3366CC;">'pointer'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
				.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
					window.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'href'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
				<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Simply select your target element(s) and use this plugin to make the entire anchor click-able again. Here&#8217;s an example:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
   $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fixClick</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>


<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area&amp;bodytext=IE6%20and%20IE7%20both%20experience%20a%20problem%20in%20which%20images%20inside%20of%20block%20elements%20inside%20of%20anchors%20lose%20their%20click%20ability.%20Here%27s%20an%20example%3A%0D%0A%0D%0A%0D%0A%0D%0A%09%0D%0A%09%09%0D%0A%09%0D%0A%0D%0A%0D%0A%0D%0AEvery%20area%20of%20the%20link%20remains%20click-able%20except%20for%20the%20surface%20consumed%20by%20someImag" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area&amp;notes=IE6%20and%20IE7%20both%20experience%20a%20problem%20in%20which%20images%20inside%20of%20block%20elements%20inside%20of%20anchors%20lose%20their%20click%20ability.%20Here%27s%20an%20example%3A%0D%0A%0D%0A%0D%0A%0D%0A%09%0D%0A%09%09%0D%0A%09%0D%0A%0D%0A%0D%0A%0D%0AEvery%20area%20of%20the%20link%20remains%20click-able%20except%20for%20the%20surface%20consumed%20by%20someImag" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;t=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area&amp;annotation=IE6%20and%20IE7%20both%20experience%20a%20problem%20in%20which%20images%20inside%20of%20block%20elements%20inside%20of%20anchors%20lose%20their%20click%20ability.%20Here%27s%20an%20example%3A%0D%0A%0D%0A%0D%0A%0D%0A%09%0D%0A%09%09%0D%0A%09%0D%0A%0D%0A%0D%0A%0D%0AEvery%20area%20of%20the%20link%20remains%20click-able%20except%20for%20the%20surface%20consumed%20by%20someImag" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area&amp;source=Michael+Hartmayer+-+Portfolio+Have+a+Leet+Smoothy&amp;summary=IE6%20and%20IE7%20both%20experience%20a%20problem%20in%20which%20images%20inside%20of%20block%20elements%20inside%20of%20anchors%20lose%20their%20click%20ability.%20Here%27s%20an%20example%3A%0D%0A%0D%0A%0D%0A%0D%0A%09%0D%0A%09%09%0D%0A%09%0D%0A%0D%0A%0D%0A%0D%0AEvery%20area%20of%20the%20link%20remains%20click-able%20except%20for%20the%20surface%20consumed%20by%20someImag" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;t=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fweb-design%2Fie6-ie7-jquery-fix-anchor-image-clickable-area%2F&amp;title=IE6%20%2F%20IE7%20jQuery%20Fix%3A%20Anchor%20Image%20Clickable%20Area" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/web-design/ie6-ie7-jquery-fix-anchor-image-clickable-area/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
