<?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>Code Couch &#187; Browsers</title>
	<atom:link href="http://www.codecouch.com/category/browsers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codecouch.com</link>
	<description>The ramblings of two code monkeys</description>
	<lastBuildDate>Thu, 19 Nov 2009 15:47:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Spell checking in Firefox</title>
		<link>http://www.codecouch.com/2008/12/spell-checking-in-firefox/</link>
		<comments>http://www.codecouch.com/2008/12/spell-checking-in-firefox/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 21:07:05 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[spell]]></category>

		<guid isPermaLink="false">http://www.codecouch.com/?p=233</guid>
		<description><![CDATA[Want to know how to spell check an entire web page in Firefox? Or how to add spell-checking to fields that do not have it by default? Read on for more.]]></description>
			<content:encoded><![CDATA[<p>A handy tip I came across the other day was how to spell-check an entire web page using Firefox &#8211; not just textarea elements.</p>
<p>You basically put the page into design mode &#8211; so the content becomes editable. Enter this in the URL bar:</p>

<div class="wp_syntax_outer"><div class="wp_syntax"><div class="wp_syntax_inner"><pre class="javascript" style="color: #000000;">javascript<span class="sy0">:</span><span class="kw1">void</span><span class="br0">&#40;</span>document.<span class="me1">designMode</span><span class="sy0">=</span><span class="st0">'on'</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div></div>

<p>You can also add spell checking to fields which do not have it by default (e.g. single-line input elements) by adding a &#8220;spellcheck&#8221; attribute set to &#8220;true&#8221;, e.g.:</p>

<div class="wp_syntax_outer"><div class="wp_syntax"><div class="wp_syntax_inner"><pre class="html4strict" style="color: #000000;"><span class="sc2"><span class="kw2">&lt;input</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text&quot;</span> <span class="kw3">size</span><span class="sy0">=</span><span class="st0">&quot;50&quot;</span> spellcheck<span class="sy0">=</span><span class="st0">&quot;true&quot;</span><span class="kw2">&gt;</span></span></pre></div></div></div>

<p>See <a href="https://developer.mozilla.org/en/Controlling_spell_checking_in_HTML_forms">https://developer.mozilla.org/en/Controlling_spell_checking_in_HTML_forms</a> for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codecouch.com/2008/12/spell-checking-in-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problems tabbing through checkboxes and radios in MacOSX Safari</title>
		<link>http://www.codecouch.com/2008/10/problems-tabbing-through-checkboxes-and-radios-in-macosx-safari/</link>
		<comments>http://www.codecouch.com/2008/10/problems-tabbing-through-checkboxes-and-radios-in-macosx-safari/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 12:45:34 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://www.codecouch.com/?p=199</guid>
		<description><![CDATA[Many people find it easier to use the tab key to cycle through the various fields of a form in a web page. If you are using a browser in MacOSX, you will find that you cannot use the tab key to access checkboxes or radio buttons... instead you have to use the mouse/trackpad. Read on for a solution.]]></description>
			<content:encoded><![CDATA[<p>Many people find it easier to use the tab key to cycle through the various fields of a form in a web page. This is a well supported and adopted behaviour &#8211; yet if you are using a browser in MacOSX, you will find that you cannot use the tab key to access checkboxes or radio buttons&#8230; instead you have to use the mouse/trackpad.</p>
<p>The solution is rather trivial &#8211; and also very simple to achieve.</p>
<p>Open the System Preferences application and choose Keyboard &#038; Mouse then change the Keyboard Shortcuts option to &#8220;All controls&#8221; (this can also be toggled using Control-Function-F7 if you are so inclined).</p>
<p>You can now use the tab key to cycle through checkboxes (use the spacebar to select a checkbox when you have cycled to it) and radio buttons (you can use up/down or left/right arrow keys to toggle a radio button when the group is in focus).</p>
<p>A similar option is available in Safari (MacOSX as well as Windows) in the Preferences menu option (within the Edit menu). Select the Advanced tab and select &#8220;Press Tab to highlight each item on a webpage&#8221;. When enabled, this option allows you to cycle through all elements that can receive focus using option+tab (this includes standard links on the page as well).</p>
<p>I&#8217;d like to credit this &#8220;discovery&#8221; to Brad Jasper and Dylan Ryan at <a href="http://www.mactips.org/archives/2008/04/30/tab-through-checkboxes-and-radio-buttons-in-safari/"> MacTips: Tips &#038; Tricks</a> &#8211; but the post is no longer available. Thanks for the heads-up guys!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codecouch.com/2008/10/problems-tabbing-through-checkboxes-and-radios-in-macosx-safari/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problems with anchors and alpha transparency filters in IE6</title>
		<link>http://www.codecouch.com/2008/10/problems-with-anchors-and-alpha-transparency-filters-in-ie6/</link>
		<comments>http://www.codecouch.com/2008/10/problems-with-anchors-and-alpha-transparency-filters-in-ie6/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 06:29:40 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://www.codecouch.com/?p=195</guid>
		<description><![CDATA[If you use the Microsoft filter CSS property to allow support for an alpha transparent PNG on an element, any links directly within that element are not clickable (in Internet Explorer 6 only). The problem is explained and a solution put forward that will make your links clickable again.]]></description>
			<content:encoded><![CDATA[<p>You can use alpha transparent PNGs in IE6 as described in <a href="http://www.codecouch.com/2007/05/how-do-i-display-alpha-transparent-pngs-across-all-browsers/">How do I display alpha transparent PNGs across all browsers</a>. There is a problem with implementing this solution &#8211; in Internet Explorer 6 links are no longer clickable when they are contained within an element with an alpha transparency filter applied.</p>
<div class="seeThrough h2Pod "><div class="seeThroughTop"><span class="tl"></span><span class="tr"></span><span class="t"></span></div><div class="seeThroughMiddle"><span class="r"></span><span class="l"></span><span class="m"></span><div class="seeThroughContent">
	<h2>The problem</h2>
</div></div><div class="seeThroughBottom"><span class="bl"></span><span class="br"></span><span class="b"></span></div></div>

<p>Consider the following CSS and HTML code snippets that set up the problem with a link contained within a div that has an alpha transparency filter applied to it:</p>

<div class="wp_syntax_outer"><div class="wp_syntax"><div class="wp_syntax_inner"><pre class="css" style="color: #000000;">&lt;style type=<span class="st0">&quot;text/css&quot;</span><span class="sy0">&gt;</span>
<span class="re1">.opaque</span> <span class="br0">&#123;</span> <span class="kw1">background</span><span class="sy0">:</span> <span class="kw2">url</span><span class="br0">&#40;</span><span class="re4">images/alphaTransparent<span class="re1">.png</span></span><span class="br0">&#41;</span> <span class="kw2">transparent</span> <span class="kw2">no-repeat</span> <span class="kw1">left</span> <span class="kw1">top</span><span class="sy0">;</span> <span class="br0">&#125;</span>
&lt;/style<span class="sy0">&gt;</span>
&lt;!--<span class="br0">&#91;</span>if IE <span class="nu0">6</span><span class="br0">&#93;</span><span class="sy0">&gt;</span>
&lt;style type=<span class="st0">&quot;text/css&quot;</span><span class="sy0">&gt;</span>
<span class="re1">.opaque</span> <span class="br0">&#123;</span>
	<span class="kw1">background-image</span><span class="sy0">:</span> <span class="kw2">none</span><span class="sy0">;</span>
	filter<span class="sy0">:</span> progid<span class="re2">:DXImageTransform</span><span class="re1">.Microsoft</span><span class="re1">.AlphaImageLoader</span><span class="br0">&#40;</span>enabled=true,sizingMethod=<span class="kw2">crop</span>,src=images/alphaTransparent<span class="re1">.png</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
&lt;/style<span class="sy0">&gt;</span>
&lt;!<span class="br0">&#91;</span>endif<span class="br0">&#93;</span>--<span class="sy0">&gt;</span></pre></div></div></div>


<div class="wp_syntax_outer"><div class="wp_syntax"><div class="wp_syntax_inner"><pre class="html4strict" style="color: #000000;">...
<span class="sc2"><span class="kw2">&lt;div</span> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;parent&quot;</span> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">&quot;opaque&quot;</span><span class="kw2">&gt;</span></span>
    <span class="sc2"><span class="kw2">&lt;span</span> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;child&quot;</span><span class="kw2">&gt;</span></span>Lorem <span class="sc2"><span class="kw2">&lt;a</span> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;http://www.codecouch.com&quot;</span><span class="kw2">&gt;</span></span>ipsum<span class="sc2"><span class="kw2">&lt;/a&gt;</span></span> dolor.<span class="sc2"><span class="kw2">&lt;/span&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;/div&gt;</span></span>
...</pre></div></div></div>

<p>The parent element has a class <b>opaque</b> applied to it which puts an image on the background of the element. In Internet Explorer 6 only, the background image is removed and the proprietary filter property is used. The link inside the child span is no longer clickable in Internet Explorer 6.</p>
<div class="seeThrough h2Pod "><div class="seeThroughTop"><span class="tl"></span><span class="tr"></span><span class="t"></span></div><div class="seeThroughMiddle"><span class="r"></span><span class="l"></span><span class="m"></span><div class="seeThroughContent">
	<h2>The solution</h2>
</div></div><div class="seeThroughBottom"><span class="bl"></span><span class="br"></span><span class="b"></span></div></div>

<p>Make sure the parent element (the element with the filter applied to it) doesn&#8217;t have the position property set on it, and the child element (the element with the link in it) has to have relative position.</p>
<p>The following addition to the above code will make the link clickable:</p>

<div class="wp_syntax_outer"><div class="wp_syntax"><div class="wp_syntax_inner"><pre class="css" style="color: #000000;">&lt;!--<span class="br0">&#91;</span>if IE <span class="nu0">6</span><span class="br0">&#93;</span><span class="sy0">&gt;</span>
&lt;style type=<span class="st0">&quot;text/css&quot;</span><span class="sy0">&gt;</span>
<span class="re0">#child</span> <span class="br0">&#123;</span> <span class="kw1">position</span><span class="sy0">:</span> <span class="kw2">relative</span><span class="sy0">;</span> <span class="br0">&#125;</span>
&lt;/style<span class="sy0">&gt;</span>
&lt;!<span class="br0">&#91;</span>endif<span class="br0">&#93;</span>--<span class="sy0">&gt;</span></pre></div></div></div>

<p>Since it only has to apply for Internet Explorer 6, the &#8220;fix&#8221; can be enclosed within the <a href="http://www.codecouch.com/2007/04/how-to-target-specific-ie-browsers-using-just-html/">conditional comment</a> that targets just that browser. This doesn&#8217;t require any javascript to work (unlike <a href="http://bjorkoy.com/past/2007/4/8/the_easiest_way_to_png/">other solutions</a> that have been posted) and degrades properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codecouch.com/2008/10/problems-with-anchors-and-alpha-transparency-filters-in-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing a disappearing caret in Firefox</title>
		<link>http://www.codecouch.com/2008/10/fixing-a-disappearing-caret-in-firefox/</link>
		<comments>http://www.codecouch.com/2008/10/fixing-a-disappearing-caret-in-firefox/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 12:45:53 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.codecouch.com/?p=178</guid>
		<description><![CDATA[The disappearing caret issue in Firefox is very annoying. There are many variations of this bug, most with fixes or workarounds. This fix is for the case where input elements on top of a fixed element do not have a caret.]]></description>
			<content:encoded><![CDATA[<p>There are many issues with Firefox hiding the caret (cursor) in text fields which have focus. There are various fixes, depending on the specifics of your issue, which mostly involve adding a style of &#8220;overflow:auto&#8221; to the input or container in question.</p>
<p>There is one case that doesn&#8217;t appear to have a fix, other than upgrading to Firefox 3: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=230701">The cursor (caret) in a text input turns invisible when it is over a fixed element</a>. I&#8217;ve known about this problem for a while, and have tried many solutions that fixed similar issues, but they never seemed to work for this specific one.</p>
<p>I&#8217;ve found a solution that works, but it has 2 drawbacks:</p>
<ol>
<li>It requires JavaScript to work</li>
<li>It causes rendering errors on the fixed element when scrolling (almost as if the fixed element is scrolling as well)</li>
</ol>
<p>Using the test harness below, you can see the problem and the fix. I&#8217;ve included my test background image after the code, to make the rendering problem very obvious.</p>

<div class="wp_syntax_outer"><div class="wp_syntax"><div class="wp_syntax_inner"><pre class="html4strict" style="color: #000000;"><span class="sc0">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span>
<span class="sc2"><span class="kw2">&lt;html</span> xmlns<span class="sy0">=</span><span class="st0">&quot;http://www.w3.org/1999/xhtml&quot;</span> <span class="kw3">dir</span><span class="sy0">=</span><span class="st0">&quot;ltr&quot;</span> <span class="kw3">lang</span><span class="sy0">=</span><span class="st0">&quot;en-US&quot;</span><span class="kw2">&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;head</span> <span class="kw3">profile</span><span class="sy0">=</span><span class="st0">&quot;http://gmpg.org/xfn/11&quot;</span><span class="kw2">&gt;</span></span>
	<span class="sc2"><span class="kw2">&lt;meta</span> <span class="kw3">http-equiv</span><span class="sy0">=</span><span class="st0">&quot;content-type&quot;</span> <span class="kw3">content</span><span class="sy0">=</span><span class="st0">&quot;text/html; charset=UTF-8&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span>
	<span class="sc2"><span class="kw2">&lt;meta</span> <span class="kw3">http-equiv</span><span class="sy0">=</span><span class="st0">&quot;content-language&quot;</span> <span class="kw3">content</span><span class="sy0">=</span><span class="st0">&quot;en&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span>
	<span class="sc2"><span class="kw2">&lt;title&gt;</span></span>Disappearing caret bug - workaround<span class="sc2"><span class="kw2">&lt;/title&gt;</span></span>
&nbsp;
	<span class="sc2"><span class="kw2">&lt;style</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/css&quot;</span><span class="kw2">&gt;</span></span>
		#fixedDiv {
			width: 100%;
			height: 100%;
			top: 0px;
			left: 0px;
			background: url(caretBugBg.gif);
			position: fixed;
		}
&nbsp;
		#contentDiv {
			position: relative;
		}
	<span class="sc2"><span class="kw2">&lt;/style&gt;</span></span>
&nbsp;
	<span class="sc2"><span class="kw2">&lt;script</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span><span class="kw2">&gt;</span></span>
		function fixCaretBug() {
			document.getElementById('fixedDiv').style.zIndex = -1;
			setTimeout(fixCaretBugPartTwo, 0);
		}
&nbsp;
		function fixCaretBugPartTwo() {
			document.getElementById('fixedDiv').style.zIndex = 0;
		}
	<span class="sc2"><span class="kw2">&lt;/script&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;/head&gt;</span></span>
&nbsp;
<span class="sc2"><span class="kw2">&lt;body&gt;</span></span>
	<span class="sc2"><span class="kw2">&lt;div</span> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;fixedDiv&quot;</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;/div&gt;</span></span>
&nbsp;
	<span class="sc2"><span class="kw2">&lt;div</span> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;contentDiv&quot;</span><span class="kw2">&gt;</span></span>
		<span class="sc2"><span class="kw2">&lt;form&gt;</span></span>
			<span class="sc2"><span class="kw2">&lt;input</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text&quot;</span> <span class="kw3">size</span><span class="sy0">=</span><span class="st0">&quot;50&quot;</span> <span class="kw3">value</span><span class="sy0">=</span><span class="st0">&quot;You cannot see the caret in this text input field...&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span>
			<span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span>
			<span class="sc2"><span class="kw2">&lt;input</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;button&quot;</span> <span class="kw3">value</span><span class="sy0">=</span><span class="st0">&quot;Click me to fix that!&quot;</span> <span class="kw3">onclick</span><span class="sy0">=</span><span class="st0">&quot;fixCaretBug();&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span>
		<span class="sc2"><span class="kw2">&lt;/form&gt;</span></span>
&nbsp;
		<span class="sc2"><span class="kw2">&lt;p&gt;</span></span>This text...<span class="sc2"><span class="kw2">&lt;/p&gt;</span></span>
		<span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span>
&nbsp;
		<span class="sc2"><span class="kw2">&lt;p&gt;</span></span>is used...<span class="sc2"><span class="kw2">&lt;/p&gt;</span></span>
		<span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span>
&nbsp;
		<span class="sc2"><span class="kw2">&lt;p&gt;</span></span>to produce a vertical scrollbar.<span class="sc2"><span class="kw2">&lt;/p&gt;</span></span>
		<span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span>
&nbsp;
		<span class="sc2"><span class="kw2">&lt;p&gt;</span></span>If you cannot see a vertical scrollbar,<span class="sc2"><span class="kw2">&lt;/p&gt;</span></span>
		<span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span>
&nbsp;
		<span class="sc2"><span class="kw2">&lt;p&gt;</span></span>reduce the size of your browser window.<span class="sc2"><span class="kw2">&lt;/p&gt;</span></span>
		<span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;br</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span>
	<span class="sc2"><span class="kw2">&lt;/div&gt;</span></span>
&nbsp;
<span class="sc2"><span class="kw2">&lt;/body&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;/html&gt;</span></span></pre></div></div></div>

<p>There is a small flicker when the fix is enabled, although this could potentially be fixed by hooking into the DOMContentLoaded event and running the fix before the background image is loaded.</p>
<div id="attachment_182" class="wp-caption" style="width:300px;"><div style="font-size:0px;"><a href="http://www.codecouch.com/wp-content/uploads/2008/10/caretbugbg.gif"><img src="http://www.codecouch.com/wp-content/uploads/2008/10/caretbugbg-300x225.gif" alt="A grey rectangle with a black cross on top of it" title="Disappearing caret bug - workaround demo background image" width="300" height="225" class="size-medium wp-image-182" /></a></div><div class="seeThrough markupPod "><div class="seeThroughTop"><span class="tl"></span><span class="tr"></span><span class="t"></span></div><div class="seeThroughMiddle"><span class="r"></span><span class="l"></span><span class="m"></span><div class="seeThroughContent">
My test background image</div></div><div class="seeThroughBottom"><span class="bl"></span><span class="br"></span><span class="b"></span></div></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.codecouch.com/2008/10/fixing-a-disappearing-caret-in-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I display alpha transparent PNGs across all browsers?</title>
		<link>http://www.codecouch.com/2007/05/how-do-i-display-alpha-transparent-pngs-across-all-browsers/</link>
		<comments>http://www.codecouch.com/2007/05/how-do-i-display-alpha-transparent-pngs-across-all-browsers/#comments</comments>
		<pubDate>Sat, 05 May 2007 09:40:05 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Graphical]]></category>

		<guid isPermaLink="false">http://www.codecouch.com/?p=104</guid>
		<description><![CDATA[Find out how you can use alpha transparency successfully across all browsers - and specifically IE 6 for Windows.]]></description>
			<content:encoded><![CDATA[<p>Many web developers have shunned the <acronym title="Portable Network Graphics">PNG</acronym> image format in the past. For some this has been because of a perceived lack of support for alpha transparency (described formally as <a title="Wikipedia entry" href="http://en.wikipedia.org/wiki/Alpha_compositing">alpha compositing</a>) in Internet Explorer. Here are some directions on how you can use alpha transparency successfully across all browsers &#8211; and specifically IE 6 for Windows.</p>
<p>The examples below rely on the following CSS code (described below):</p>

<div class="wp_syntax_outer"><div class="wp_syntax"><div class="wp_syntax_inner"><pre class="css" style="color: #000000;">&lt;style type=<span class="st0">&quot;text/css&quot;</span><span class="sy0">&gt;</span>
  <span class="re0">#demo1</span> <span class="br0">&#123;</span>
    <span class="kw1">width</span><span class="sy0">:</span> <span class="re3">250px</span><span class="sy0">;</span>
    <span class="kw1">height</span><span class="sy0">:</span> <span class="re3">100px</span><span class="sy0">;</span>
    <span class="kw1">background</span><span class="sy0">:</span> <span class="kw2">url</span><span class="br0">&#40;</span><span class="re4">images/logo<span class="re1">.png</span></span><span class="br0">&#41;</span> <span class="kw2">transparent</span> <span class="nu0">0</span> <span class="nu0">0</span> <span class="kw2">no-repeat</span><span class="sy0">;</span>
  <span class="br0">&#125;</span>
&lt;/style<span class="sy0">&gt;</span>
&lt;!––<span class="br0">&#91;</span>if lt IE <span class="nu0">7</span><span class="br0">&#93;</span><span class="sy0">&gt;</span>
&lt;style type=<span class="st0">&quot;text/css&quot;</span><span class="sy0">&gt;</span>
  <span class="re0">#demo1</span> <span class="br0">&#123;</span>
    <span class="kw1">background-image</span><span class="sy0">:</span> <span class="kw2">none</span><span class="sy0">;</span>
    filter<span class="sy0">:</span> progid<span class="re2">:DXImageTransform</span><span class="re1">.Microsoft</span><span class="re1">.AlphaImageLoader</span>
        <span class="br0">&#40;</span>enabled=true,sizingMethod=scale,src=/images/logo<span class="re1">.png</span><span class="br0">&#41;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span>
&lt;/style<span class="sy0">&gt;</span>
&lt;!<span class="br0">&#91;</span>endif<span class="br0">&#93;</span>––<span class="sy0">&gt;</span></pre></div></div></div>

<p>The first block of CSS sets a background image on an element with the id “demo1″ (typically a div, span or img) for all browsers. This works fine for everything else, but doesn’t work with IE prior to version 7.</p>
<p>The second block targets just these “broken” browsers through use of a <a href="http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp">conditional comment</a>. This second block uses the filter property to set up a proper alpha transparent version of the png. Read more about this here at the <a href="http://msdn2.microsoft.com/en-us/library/ms532969.aspx">MSDN site</a>.</p>
<p>In the following example the CSS above would show the logo.png with alpha transparency as the background to a div:</p>

<div class="wp_syntax_outer"><div class="wp_syntax"><div class="wp_syntax_inner"><pre class="html4strict" style="color: #000000;"><span class="sc2"><span class="kw2">&lt;div</span> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;demo1&quot;</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;/div&gt;</span></span></pre></div></div></div>

<p>This next example shows that you can display a png with alpha transparency by targetting a transparent image:</p>

<div class="wp_syntax_outer"><div class="wp_syntax"><div class="wp_syntax_inner"><pre class="html4strict" style="color: #000000;"><span class="sc2"><span class="kw2">&lt;img</span> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;transparent.gif&quot;</span> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;demo1&quot;</span> <span class="kw3">alt</span><span class="sy0">=</span><span class="st0">&quot;&quot;</span><span class="sy0">/</span><span class="kw2">&gt;</span></span></pre></div></div></div>

<p>There are plenty of variations of this technique. All the examples above are considered “standards friendly”. This final example shows the same CSS simplified (but not passing validation):</p>

<div class="wp_syntax_outer"><div class="wp_syntax"><div class="wp_syntax_inner"><pre class="css" style="color: #000000;">&lt;style type=<span class="st0">&quot;text/css&quot;</span><span class="sy0">&gt;</span>
  <span class="re0">#demo1</span> <span class="br0">&#123;</span>
    <span class="kw1">width</span><span class="sy0">:</span> <span class="re3">250px</span><span class="sy0">;</span>
    <span class="kw1">height</span><span class="sy0">:</span> <span class="re3">100px</span><span class="sy0">;</span>
    <span class="kw1">background</span><span class="sy0">:</span> <span class="kw2">url</span><span class="br0">&#40;</span><span class="re4">images/logo<span class="re1">.png</span></span><span class="br0">&#41;</span> <span class="kw2">transparent</span> <span class="nu0">0</span> <span class="nu0">0</span> <span class="kw2">no-repeat</span><span class="sy0">;</span>
    _background-image<span class="sy0">:</span> <span class="kw2">none</span><span class="sy0">;</span>
    _filter<span class="sy0">:</span> progid<span class="re2">:DXImageTransform</span><span class="re1">.Microsoft</span><span class="re1">.AlphaImageLoader</span>
        <span class="br0">&#40;</span>enabled=true,sizingMethod=scale,src=/images/logo<span class="re1">.png</span><span class="br0">&#41;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span>
&lt;/style<span class="sy0">&gt;</span></pre></div></div></div>

<p>If you are putting the CSS above into an external stylesheet, then be aware that the path to the logo.png when used as the background image is relative to the CSS file, but the path to logo.png when used in the filter is relative to the enclosing HTML file. This can cause some confusion.</p>
<p>On a related note… you should always <a href="http://www.codecouch.com/2007/06/make-your-alpha-transparent-pngs-32-bit/">ensure your alpha transparent PNGs are 32-bit</a> to ensure that they always display the same colour across all browsers (specifically Firefox and IE displayed a 24-bit alpha transparent PNG differently using the technique described here &#8211; changing it to 32-bit confirmed this was the case).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codecouch.com/2007/05/how-do-i-display-alpha-transparent-pngs-across-all-browsers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to target specific IE browsers using just HTML?</title>
		<link>http://www.codecouch.com/2007/04/how-to-target-specific-ie-browsers-using-just-html/</link>
		<comments>http://www.codecouch.com/2007/04/how-to-target-specific-ie-browsers-using-just-html/#comments</comments>
		<pubDate>Wed, 18 Apr 2007 10:08:01 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[HTML/XHTML]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.codecouch.com/?p=110</guid>
		<description><![CDATA[Conditional comments are totally valid markup (for HTML as well as XHTML doctypes) that cause IE browsers running in Windows to parse the contents of the commented markup.]]></description>
			<content:encoded><![CDATA[<p>Many people were introduced to <a href="http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp">conditional comments</a> with the introduction of IE7 and their grass-roots <a href="http://blogs.msdn.com/ie/archive/2005/10/12/480242.aspx">call to action</a> to stop using “CSS Hacks” to target specific IE browser versions.</p>
<p>Conditional comments are totally valid markup (for HTML as well as XHTML doctypes) that cause IE browsers running in Windows (the old Mac versions of IE ignored them completely) to parse the contents of the commented markup.</p>
<p>The following code shows how a conditional comment can be used to match “all versions of IE less than version 7″ and include an extra css file and an extra div in the content of the page:</p>

<div class="wp_syntax_outer"><div class="wp_syntax"><div class="wp_syntax_inner"><pre class="html4strict" style="color: #000000;"><span class="sc2"><span class="kw2">&lt;html&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;head&gt;</span></span>
  <span class="sc2"><span class="kw2">&lt;link</span> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;default.css&quot;</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/css&quot;</span> <span class="kw3">rel</span><span class="sy0">=</span><span class="st0">&quot;stylesheet&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;</span>!––<span class="br0">&#91;</span>if lt IE <span class="nu0">7</span><span class="br0">&#93;</span><span class="kw2">&gt;</span></span>
  <span class="sc2"><span class="kw2">&lt;link</span> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;iexplore.css&quot;</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/css&quot;</span> <span class="kw3">rel</span><span class="sy0">=</span><span class="st0">&quot;stylesheet&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;</span>!<span class="br0">&#91;</span>endif<span class="br0">&#93;</span>––<span class="kw2">&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;/head&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;body&gt;</span></span>
  <span class="sc2"><span class="kw2">&lt;h1&gt;</span></span>Testing<span class="sc2"><span class="kw2">&lt;/h1&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;</span>!––<span class="br0">&#91;</span>if lt IE <span class="nu0">7</span><span class="br0">&#93;</span><span class="kw2">&gt;</span></span>
  <span class="sc2"><span class="kw2">&lt;div&gt;</span></span>I’m an old IE running in Windows<span class="sc2"><span class="kw2">&lt;/div&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;</span>!<span class="br0">&#91;</span>endif<span class="br0">&#93;</span>––<span class="kw2">&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;/body&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;/html&gt;</span></span></pre></div></div></div>

<p>Because of the start HTML comment code (<code>&lt;!--</code>), everything until the close HTML comment code (<code>--&gt;</code>) is treated as a comment for non matching IE Windows browsers.</p>
<p>The code that is actually rendered by the browser is different when viewed in IE Windows browsers older than IE7 and any other browser:</p>

<div class="wp_syntax_outer"><div class="wp_syntax"><div class="wp_syntax_inner"><pre class="html4strict" style="color: #000000;"><span class="sc2"><span class="kw2">&lt;html&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;head&gt;</span></span>
  <span class="sc2"><span class="kw2">&lt;link</span> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;default.css&quot;</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/css&quot;</span> <span class="kw3">rel</span><span class="sy0">=</span><span class="st0">&quot;stylesheet&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span>
  <span class="sc2"><span class="kw2">&lt;link</span> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;iexplore.css&quot;</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/css&quot;</span> <span class="kw3">rel</span><span class="sy0">=</span><span class="st0">&quot;stylesheet&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;/head&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;body&gt;</span></span>
  <span class="sc2"><span class="kw2">&lt;h1&gt;</span></span>Testing<span class="sc2"><span class="kw2">&lt;/h1&gt;</span></span>
  <span class="sc2"><span class="kw2">&lt;div&gt;</span></span>I'm an old IE running in Windows<span class="sc2"><span class="kw2">&lt;/div&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;/body&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;/html&gt;</span></span></pre></div></div></div>

<p>This is the code that is rendered in other browsers:</p>

<div class="wp_syntax_outer"><div class="wp_syntax"><div class="wp_syntax_inner"><pre class="html4strict" style="color: #000000;"><span class="sc2"><span class="kw2">&lt;html&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;head&gt;</span></span>
  <span class="sc2"><span class="kw2">&lt;link</span> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;default.css&quot;</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/css&quot;</span> <span class="kw3">rel</span><span class="sy0">=</span><span class="st0">&quot;stylesheet&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;/head&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;body&gt;</span></span>
  <span class="sc2"><span class="kw2">&lt;h1&gt;</span></span>Testing<span class="sc2"><span class="kw2">&lt;/h1&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;/body&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;/html&gt;</span></span></pre></div></div></div>

<p>You might choose to use this to set some variables on the page for javascript to use &#8211; without having to worry about user agent detection issues and spoofing browsers (remember that this will not work for the old IE Mac browsers &#8211; only Windows):</p>

<div class="wp_syntax_outer"><div class="wp_syntax"><div class="wp_syntax_inner"><pre class="html4strict" style="color: #000000;"><span class="sc2"><span class="kw2">&lt;script</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span><span class="kw2">&gt;</span></span>
  var isIE=isIE5=isIE6=isIE7=false;
<span class="sc2"><span class="kw2">&lt;/script&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;</span>!––<span class="br0">&#91;</span>if IE<span class="br0">&#93;</span><span class="kw2">&gt;</span></span>
  <span class="sc2"><span class="kw2">&lt;script</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span><span class="kw2">&gt;</span></span>
    isIE=true;
  <span class="sc2"><span class="kw2">&lt;/script&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;</span>!<span class="br0">&#91;</span>endif<span class="br0">&#93;</span>––<span class="kw2">&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;</span>!––<span class="br0">&#91;</span>if IE <span class="nu0">7</span><span class="br0">&#93;</span><span class="kw2">&gt;</span></span>
  <span class="sc2"><span class="kw2">&lt;script</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span><span class="kw2">&gt;</span></span>
    isIE7=true;
  <span class="sc2"><span class="kw2">&lt;/script&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;</span>!<span class="br0">&#91;</span>endif<span class="br0">&#93;</span>––<span class="kw2">&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;</span>!––<span class="br0">&#91;</span>if IE <span class="nu0">6</span><span class="br0">&#93;</span><span class="kw2">&gt;</span></span>
  <span class="sc2"><span class="kw2">&lt;script</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span><span class="kw2">&gt;</span></span>
    isIE6=true;
  <span class="sc2"><span class="kw2">&lt;/script&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;</span>!<span class="br0">&#91;</span>endif<span class="br0">&#93;</span>––<span class="kw2">&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;</span>!––<span class="br0">&#91;</span>if IE <span class="nu0">5</span><span class="br0">&#93;</span><span class="kw2">&gt;</span></span>
  <span class="sc2"><span class="kw2">&lt;script</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span><span class="kw2">&gt;</span></span>
    isIE5=true;
  <span class="sc2"><span class="kw2">&lt;/script&gt;</span></span>
<span class="sc2"><span class="kw2">&lt;</span>!<span class="br0">&#91;</span>endif<span class="br0">&#93;</span>––<span class="kw2">&gt;</span></span></pre></div></div></div>

<p>Be sure to check out the difference between <b>down-level hidden</b> (which is what I have used all the examples in this FAQ) and <b>down-level revealed</b> at the <a href="http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp">MSDN conditional comments</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codecouch.com/2007/04/how-to-target-specific-ie-browsers-using-just-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft finally retires IE 5 for the Mac</title>
		<link>http://www.codecouch.com/2005/12/microsoft-finally-retires-ie-5-for-the-mac/</link>
		<comments>http://www.codecouch.com/2005/12/microsoft-finally-retires-ie-5-for-the-mac/#comments</comments>
		<pubDate>Thu, 15 Dec 2005 11:03:31 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.codecouch.com/?p=122</guid>
		<description><![CDATA[On December 14th 2005, Microsoft quietly published an update onto their web site. They announced they are finally ending all support for Macintosh Internet Explorer as of 31st December 2005 and will not be providing any further security or perfomance updates.]]></description>
			<content:encoded><![CDATA[<p>On December 14th 2005, <a title="Click to visit the main Microsoft website" href="http://www.microsoft.com/">Microsoft</a> quietly published an <a title="Click to read Microsoft's statement about Macintosh Internet Explorer support being dropped" href="http://www.microsoft.com/mac/products/internetexplorer/internetexplorer.aspx?pid=internetexplorer">update onto their web site</a>. They announced they are finally ending all support for <a title="Click to visit the download page for the latest Macintosh Internet Explorer" href="http://www.microsoft.com/mac/downloads.aspx#IE">Macintosh Internet Explorer</a> as of 31st December 2005 and will not be providing any further security or performance updates. Furthermore, the browser will not be available for download from January 31st, 2006. They then go on to actively promote users adopt Apple Safari as a “more recent browsing technology”.</p>
<p>This isn’t really completely new &#8211; it has been in <a title="View Microsoft's Lifecycle Policy document for Macintosh product" href="http://support.microsoft.com/gp/lifemacfaq">Microsoft’s Lifecycle Policy document</a> since at least June 2003 (as seen in <a title="Click to view the CNet news article on this announcement" href="http://news.com.com/2100-1045_3-1017126.html">this CNet news article from June 2003</a>).</p>
<p>When it was <a title="Click to view an article singing the praises of IE5 for the Mac from Alistapart" href="http://www.alistapart.com/articles/ie5mac/">first released in March 2000</a>, version 5.x of IE for the Mac was much more standards compliant than it’s Windows counterpart &#8211; and even though Microsoft ended development over 2 and a half years ago, the browser still performed better at rendering CSS in a consistent fashion than more modern Windows Internet Explorer builds. That’s not to say the Macintosh version wasn’t ready for retirement… and without anyone remaining to develop it… it’s loyal users have quietly migrated away.</p>
<p>We now have Apple’s flagship <a title="Click to visit the Safari product pages at Apple.com" href="http://www.apple.com/safari/">Safari</a> as well as the latest <a title="Click to visit the Firefox website" href="http://www.mozilla.com/firefox/">Firefox</a>, and <a title="Click to visit the Opera website" href="http://www.opera.com/">Opera</a> browsers available for <a title="Click to visit the MacOSX product pages at the Apple website" href="http://www.apple.com/macosx/">MacOSX</a> as well as a dedicated following of less well-known browsers (including <a title="Click to visit the iCab website" href="http://www.icab.de/">iCab</a> and <a title="Click to visit the Camino website" href="http://www.caminobrowser.org/">Camino</a>) that remain in development.</p>
<p>I don’t think the loss of IE is going to be a problem for Mac users and web developers going forward &#8211; it will be good to see it finally drop off the web logs, though.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codecouch.com/2005/12/microsoft-finally-retires-ie-5-for-the-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
