<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Bitesize Bugs</title>
	<atom:link href="http://bitesizebugs.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bitesizebugs.wordpress.com</link>
	<description></description>
	<lastBuildDate>Tue, 16 Aug 2011 13:16:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='bitesizebugs.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/1ab4d5f83d8f1408729c682bbe89d6cf?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Bitesize Bugs</title>
		<link>http://bitesizebugs.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://bitesizebugs.wordpress.com/osd.xml" title="Bitesize Bugs" />
	<atom:link rel='hub' href='http://bitesizebugs.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Accidental Global Variables in JavaScript</title>
		<link>http://bitesizebugs.wordpress.com/2011/07/19/accidental-global-variables-in-javascript/</link>
		<comments>http://bitesizebugs.wordpress.com/2011/07/19/accidental-global-variables-in-javascript/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 11:53:14 +0000</pubDate>
		<dc:creator>bitesizebugs</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[global]]></category>
		<category><![CDATA[global scope]]></category>
		<category><![CDATA[private]]></category>
		<category><![CDATA[private scope]]></category>
		<category><![CDATA[quirk]]></category>
		<category><![CDATA[scope]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://bitesizebugs.wordpress.com/?p=113</guid>
		<description><![CDATA[Omitting the &#8220;var&#8221; keyword when declaring a variable in JavaScript will scope it to the global namespace. Thus, the variable is no longer bound to the scope of the parent function or object instance, but accessibile to every other script through the global &#8220;window&#8221; object. Example See https://gist.github.com/1092039 Avoid accidentally creating global variables by always declaring [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=113&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Omitting the &#8220;var&#8221; keyword when declaring a variable in JavaScript will scope it to the global namespace.</p>
<p>Thus, the variable is no longer bound to the scope of the parent function or object instance, but accessibile to every other script through the global &#8220;window&#8221; object.</p>
<h3>Example</h3>
<p>See <a title="Example for creating accidental global variables in JavaScript " href="https://gist.github.com/1092039" target="_blank">https://gist.github.com/1092039</a></p>
<p><strong>Avoid accidentally creating global variables by always declaring them with &#8216;var&#8217;. </strong></p>
<p>This problem gets especially frustrating when expecting variables to be private, bound to instances of an object. You soon realize that your instances&#8217; internal states change unexpectedly.</p>
<pre></pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitesizebugs.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitesizebugs.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitesizebugs.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitesizebugs.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitesizebugs.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitesizebugs.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitesizebugs.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitesizebugs.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitesizebugs.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitesizebugs.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitesizebugs.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitesizebugs.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitesizebugs.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitesizebugs.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=113&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitesizebugs.wordpress.com/2011/07/19/accidental-global-variables-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f5f207e26b3b032dfc15f98cf3168ce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bitesizebugs</media:title>
		</media:content>
	</item>
		<item>
		<title>Dinamically add an itemRenderer in Flex</title>
		<link>http://bitesizebugs.wordpress.com/2010/02/01/dinamically-add-an-itemrenderer-in-flex/</link>
		<comments>http://bitesizebugs.wordpress.com/2010/02/01/dinamically-add-an-itemrenderer-in-flex/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 07:47:12 +0000</pubDate>
		<dc:creator>bitesizebugs</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[ClassFactory]]></category>
		<category><![CDATA[Component]]></category>
		<category><![CDATA[DataGridColumn]]></category>
		<category><![CDATA[IFactory]]></category>
		<category><![CDATA[itemRenderer]]></category>
		<category><![CDATA[mx.core.IFactory]]></category>

		<guid isPermaLink="false">http://bitesizebugs.wordpress.com/?p=97</guid>
		<description><![CDATA[Problem: missing mx.core.IFactory When trying to dynamically add an itemRenderer to a component in Flex you cannot specify it by string path as in MXML mode. Doing so you get a TypeError similar to the following: Type Coercion failed: cannot convert &#8220;path.to.YourItemRenderer&#8221; to mx.core.IFactory Solution: use ClassFactory() Working in AS3 with dynamic objects, not MXML [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=97&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>Problem: missing mx.core.IFactory</h2>
<p>When trying to dynamically add an <code>itemRenderer</code> to a component in Flex you cannot specify it by string path as in MXML mode. Doing so you get a <code>TypeError</code> similar to the following:<br />
<strong><br />
Type Coercion failed: cannot convert &#8220;path.to.YourItemRenderer&#8221; to mx.core.IFactory<br />
</strong></p>
<p></p>
<h3>Solution: use ClassFactory()</h2>
<p>Working in <abbr title="ActionScript 3">AS3</abbr> with dynamic objects, not MXML references, you need to instantiate the <code>itemRenderer</code> with a <code>ClassFactory</code>. This causes the <code>itemRenderer</code> to implement the required <code>mx.core.IFactory</code> interface.</p>
<h3>Example</h3>
<p></p>
<pre>
import mx.core.ClassFactory;
import path.to.YourItemRenderer;

var col:DataGridColumn = new DataGridColumn();
<strong>col.itemRenderer = new ClassFactory(YourItemRenderer);</strong>
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitesizebugs.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitesizebugs.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitesizebugs.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitesizebugs.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitesizebugs.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitesizebugs.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitesizebugs.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitesizebugs.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitesizebugs.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitesizebugs.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitesizebugs.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitesizebugs.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitesizebugs.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitesizebugs.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=97&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitesizebugs.wordpress.com/2010/02/01/dinamically-add-an-itemrenderer-in-flex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f5f207e26b3b032dfc15f98cf3168ce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bitesizebugs</media:title>
		</media:content>
	</item>
		<item>
		<title>Building an inline search box</title>
		<link>http://bitesizebugs.wordpress.com/2009/08/17/building-an-inline-search-box/</link>
		<comments>http://bitesizebugs.wordpress.com/2009/08/17/building-an-inline-search-box/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 11:22:36 +0000</pubDate>
		<dc:creator>bitesizebugs</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Front-end]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://bitesizebugs.wordpress.com/?p=81</guid>
		<description><![CDATA[This article provides a workaround for Internet Explorer&#8217;s bug when handling padding-right on text input elements. The problem is clearly visible when building a particular search box design, with the search button included in the search field. Internet Explorer will allow long search queries to slide under the search button. A feasible workaround for IE&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=81&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This article provides a workaround for <a title="Padding right not working in Internet Explorer for input elements" href="http://bitesizebugs.wordpress.com/2009/08/17/padding-right-problem-on-text-input-in-internet-explorer/">Internet Explorer&#8217;s bug when handling padding-right</a> on text input elements.</p>
<p>The problem is clearly visible when building a particular search box design, with the search button included in the search field. Internet Explorer will allow long search queries to slide under the search button.</p>
<p>A feasible workaround for IE&#8217;s padding problem is to wrap the search button and the input field in a container that you can style to look like an input.</p>
<h3>Example</h3>
<p>See a <a title="Inline search box demo page" href="http://bitesizebugs.com/lab/inline-search-box/" target="_blank">working example</a> of the inline search box.</p>
<div id="attachment_84" class="wp-caption alignnone" style="width: 310px"><a href="http://bitesizebugs.com/lab/inline-search-box/"><img class="size-full wp-image-84 " title="inline-search-box" src="http://bitesizebugs.files.wordpress.com/2009/08/inline-search-box.png?w=406" alt="Inline search box that looks and works fine in all major browsers."   /></a><p class="wp-caption-text">Inline search box that looks and works fine in all major browsers.</p></div>
<p><strong>HTML Markup</strong></p>
<pre>&lt;form action="#" method="get" &gt;
  &lt;input type="text" name="q" value="Search for..."/&gt;
  &lt;button type="submit"&gt;Search&lt;/button&gt;
&lt;/form&gt;</pre>
<p><strong>CSS</strong></p>
<pre>form{
  padding:1px 5px 1px 3px;
  border:3px solid #ebebeb;
  ...
}

input{
 <strong> border:none;
  border-color:transparent;</strong> /*Fix IE*/
  ...
}

button{
  width:16px;
  height:16px;
  outline:none;
  border:none;
  background:#5AB300 url(button_search.png) left center no-repeat;
  text-indent:-999px;
  ...
}</pre>
<h3>Removing the input border</h3>
<p>Using the <strong>border: none</strong> property will remove the input&#8217;s border from most browsers but not for Internet Explorer. In order to fix IE&#8217;s input border you need to also add <strong>border-color: transparent</strong>. More about this issue on IE&#8217;s <a title="Border: none not working in Internet Explorer" href="http://bitesizebugs.wordpress.com/2009/08/17/border-none-not-working-on-text-input-in-internet-explorer/" target="_blank">buggy border property in this article</a>.</p>
<h3>The search button</h3>
<p>The search button is placed inline with the input element but inside the container that looks like an input. There is a reason for this placement instead of assigning a negative left margin to the button. In Internet Explorer the input will not apply padding-right correctly so the input&#8217;s text value will slide under the button for long strings.</p>
<p>I wrote more about this problem in an article about <a title="Padding right not working in Internet Explorer for input elements" href="http://bitesizebugs.wordpress.com/2009/08/17/padding-right-problem-on-text-input-in-internet-explorer/">IE&#8217;s problem with right padding</a> on input elements.</p>
<h3>Accessibility</h3>
<p>When you disguise the input by removing its border the element will still show its true dimensions when in focused state. This is caused by the <strong>outline</strong> property you can set with CSS. The<strong> outline</strong> on input elements is very prominent in Safari as a bright blue halo around the editable content area.</p>
<div id="attachment_86" class="wp-caption alignnone" style="width: 310px"><img class="size-full wp-image-86" title="focused-input-outline-safari" src="http://bitesizebugs.files.wordpress.com/2009/08/focused-input-outline-safari.png?w=406" alt="Focused input on safari shows a bright blue halo"   /><p class="wp-caption-text">Focused input on Safari shows a bright blue halo</p></div>
<p>Due to accessibility concerns my suggestion is that you don&#8217;t remove the outline from the input. Users used with Safari will understand that they&#8217;re actually typing in an input there.</p>
<p>If, however, there are other concerns that prevent you from using Safari&#8217;s blue halo you can disable it by using:</p>
<pre>input{
  outline:none;
}</pre>
<h3>Focus state workaround</h3>
<p>When disabling the browser&#8217;s default focus style on input elements I strongly suggest that you at least offer an alternative. You can do so with JavaScript by assigning a modifier class name on the container that would change its border or background color when the input is focused.</p>
<p>Here&#8217;s a quick <a title="jQuery javascript framework" href="http://jquery.com/" target="_blank">jQuery</a> workaround for the above example:</p>
<pre>$('input')
  .bind('focus', function(){
    $(this).parents('form').addClass('focus');
  })
<pre>  .bind('blur', function(){
    $(this).parents('form').removeClass('focus');
  })</pre>
</pre>
<p>And the required CSS:</p>
<pre>.focus{
  border-color:#09c; /* a blue border color */
}

.focus input{
  outline:none; /* cancel the browser's default input outline */
}</pre>
<div id="attachment_87" class="wp-caption alignnone" style="width: 310px"><img class="size-full wp-image-87" title="focused-input-outline-alternative" src="http://bitesizebugs.files.wordpress.com/2009/08/focused-input-outline-alternative.png?w=406" alt="Alternative for the browser’s default focused state by using a modifier CSS class"   /><p class="wp-caption-text">Alternative for the browser’s default focused state by using a modifier CSS class</p></div>
<h3>Hidden text</h3>
<p>Another accessibility concern you should have is the search button&#8217;s text value. I used an image background for the button and hid the text. You might think I could have used an <strong>input type=&#8221;image&#8221;</strong> or I could have just let the button tag empty, but I didn&#8217;t.</p>
<p>I chose to hide the text off-screen, but leave it contextually in the page structure, because a screen reader would actually interpret that text to a visually impaired user.</p>
<pre>button{
<strong>  text-indent:-999px;</strong>
  ...
}</pre>
<p>This is also useful in an environment with little or no CSS support because it will keep the search box usable by replacing the arrow I used with a valid control.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitesizebugs.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitesizebugs.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitesizebugs.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitesizebugs.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitesizebugs.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitesizebugs.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitesizebugs.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitesizebugs.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitesizebugs.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitesizebugs.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitesizebugs.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitesizebugs.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitesizebugs.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitesizebugs.wordpress.com/81/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=81&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitesizebugs.wordpress.com/2009/08/17/building-an-inline-search-box/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f5f207e26b3b032dfc15f98cf3168ce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bitesizebugs</media:title>
		</media:content>

		<media:content url="http://bitesizebugs.files.wordpress.com/2009/08/inline-search-box.png" medium="image">
			<media:title type="html">inline-search-box</media:title>
		</media:content>

		<media:content url="http://bitesizebugs.files.wordpress.com/2009/08/focused-input-outline-safari.png" medium="image">
			<media:title type="html">focused-input-outline-safari</media:title>
		</media:content>

		<media:content url="http://bitesizebugs.files.wordpress.com/2009/08/focused-input-outline-alternative.png" medium="image">
			<media:title type="html">focused-input-outline-alternative</media:title>
		</media:content>
	</item>
		<item>
		<title>Padding right problem on text input in Internet Explorer</title>
		<link>http://bitesizebugs.wordpress.com/2009/08/17/padding-right-problem-on-text-input-in-internet-explorer/</link>
		<comments>http://bitesizebugs.wordpress.com/2009/08/17/padding-right-problem-on-text-input-in-internet-explorer/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 09:37:09 +0000</pubDate>
		<dc:creator>bitesizebugs</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[IE7]]></category>

		<guid isPermaLink="false">http://bitesizebugs.wordpress.com/?p=54</guid>
		<description><![CDATA[Internet Explorer does not correctly apply right padding on text and password inputs. This problem is clearly visible when placing another element over the input, a common case in search box design patterns. Demo Have a look at the live code example. The input&#8217;s text value slides under the button element in Internet Explorer, while [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=54&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Internet Explorer does not correctly apply right padding on text and password inputs.</p>
<p>This problem is clearly visible when placing another element over the input, a common case in search box design patterns.</p>
<h3>Demo</h3>
<p>Have a look at the <a title="Demo page: right padding problem on text inputs in Internet Explorer versions" href="http://bitesizebugs.com/lab/input-padding-right/" target="_self">live code example</a>.</p>
<div class="wp-caption alignnone" style="width: 227px"><a href="http://bitesizebugs.com/lab/input-padding-right/"><img class="  " title="input type text problem in internet explorer" src="http://bitesizebugs.com/lab/input-padding-right/padding-right-internet-explorer-ie6-ff3.5-safari4.png" alt="Padding right problem on input elements in Internet Explorer." width="217" height="300" /></a><p class="wp-caption-text">Right padding problem on input elements in Internet Explorer.</p></div>
<p>The input&#8217;s text value slides under the button element in Internet Explorer, while in other browsers it is correctly hidden because of the padding property.</p>
<h3>Code Example</h3>
<p><strong>HTML markup</strong></p>
<pre>&lt;input type="text" name="textInput" /&gt;
&lt;button type="submit"&gt;Search&lt;/button&gt;</pre>
<p><strong>CSS</strong></p>
<pre>input{
  padding-right:30px;
  ...
}
button{
  margin-left:-30px;
  ...
}</pre>
<h3>Workaround</h3>
<p>Since there&#8217;s no obvious solution for Internet Explorer&#8217;s right padding problem, a feasible workaround is to visually fake the input. You can do so by wrapping the markup in a container that you can style to  look as an input field.</p>
<p>I&#8217;ve written a separate article to tackle this workaround for <a title="How to build an inline search box with CSS and HTML" href="http://bitesizebugs.wordpress.com/2009/08/17/building-an-inline-search-box/" target="_blank">building an inline search box</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitesizebugs.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitesizebugs.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitesizebugs.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitesizebugs.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitesizebugs.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitesizebugs.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitesizebugs.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitesizebugs.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitesizebugs.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitesizebugs.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitesizebugs.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitesizebugs.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitesizebugs.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitesizebugs.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=54&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitesizebugs.wordpress.com/2009/08/17/padding-right-problem-on-text-input-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f5f207e26b3b032dfc15f98cf3168ce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bitesizebugs</media:title>
		</media:content>

		<media:content url="http://bitesizebugs.com/lab/input-padding-right/padding-right-internet-explorer-ie6-ff3.5-safari4.png" medium="image">
			<media:title type="html">input type text problem in internet explorer</media:title>
		</media:content>
	</item>
		<item>
		<title>Border: none not working on text input in Internet Explorer</title>
		<link>http://bitesizebugs.wordpress.com/2009/08/17/border-none-not-working-on-text-input-in-internet-explorer/</link>
		<comments>http://bitesizebugs.wordpress.com/2009/08/17/border-none-not-working-on-text-input-in-internet-explorer/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 09:15:22 +0000</pubDate>
		<dc:creator>bitesizebugs</dc:creator>
				<category><![CDATA[IE6]]></category>
		<category><![CDATA[IE7]]></category>

		<guid isPermaLink="false">http://bitesizebugs.wordpress.com/?p=64</guid>
		<description><![CDATA[Internet Explorer will not remove an input&#8217;s border when using the border: none CSS property. In order to achieve this effect for other major browsers as well as for IE you need to also add border-color: transparent. Update April 2010 As noted in allex&#8217;s comment below there is a simpler solution: input{ border:0 } I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=64&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Internet Explorer will not remove an input&#8217;s border when using the <strong>border: none</strong> CSS property. In order to achieve this effect for other major browsers as well as for IE you need to also add <strong>border-color: transparent.</strong></p>
<h3><strong>Update April 2010</strong></h3>
<p>As noted in allex&#8217;s comment below  there is a simpler solution:</p>
<pre>input{
  border:0
}
</pre>
<p>I have tested this out and it works fine on all the major browsers  (IE 6+, Firefox 3+, Safari 4+, Chrome and Opera).</p>
<h3>Example</h3>
<p>See a working example on the <a title="Demo page: border: none not working in internet explorer" href="http://bitesizebugs.com/lab/border-none-ie/" target="_blank">demo page</a>.</p>
<div id="attachment_65" class="wp-caption alignnone" style="width: 370px"><a href="http://bitesizebugs.com/lab/border-none-ie/"><img class="size-full wp-image-65 " title="border-none-internet-explorer" src="http://bitesizebugs.files.wordpress.com/2009/08/border-none-internet-explorer.png?w=406" alt="Internet Explorer removes input border when using border:none and border-color:transparent"   /></a><p class="wp-caption-text">Internet Explorer removes input border when using border: none and border-color: transparent</p></div>
<p><strong>HTML markup</strong></p>
<pre>&lt;input type="text" value="textInput" /&gt;</pre>
<p><strong>CSS</strong></p>
<pre>input{
  border: none;
  <strong>border-color: transparent;</strong>
}</pre>
<h3>Side effects</h3>
<p>Be careful when using border-color: transparent with border: none because they will impact the input&#8217;s box model by removing the border&#8217;s dimensions.<br />
This will alter the input&#8217;s relationship, like vertical positioning, with surrounding elements.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitesizebugs.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitesizebugs.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitesizebugs.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitesizebugs.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitesizebugs.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitesizebugs.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitesizebugs.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitesizebugs.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitesizebugs.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitesizebugs.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitesizebugs.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitesizebugs.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitesizebugs.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitesizebugs.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=64&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitesizebugs.wordpress.com/2009/08/17/border-none-not-working-on-text-input-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f5f207e26b3b032dfc15f98cf3168ce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bitesizebugs</media:title>
		</media:content>

		<media:content url="http://bitesizebugs.files.wordpress.com/2009/08/border-none-internet-explorer.png" medium="image">
			<media:title type="html">border-none-internet-explorer</media:title>
		</media:content>
	</item>
		<item>
		<title>Double 50% width float problem in Internet Explorer</title>
		<link>http://bitesizebugs.wordpress.com/2009/08/11/double-50-width-float-problem-in-internet-explorer/</link>
		<comments>http://bitesizebugs.wordpress.com/2009/08/11/double-50-width-float-problem-in-internet-explorer/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 20:54:04 +0000</pubDate>
		<dc:creator>bitesizebugs</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[IE8]]></category>

		<guid isPermaLink="false">http://bitesizebugs.wordpress.com/?p=42</guid>
		<description><![CDATA[Problem Two floated 50% width elements in a container that has an odd width will clear each other in Internet Explorer. One of them will always clear and move under to the next level. Reason This issue is due to IE&#8217;s way to calculate sub-pixel dimensions. Internet Explorer will approximate to the next higher integer [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=42&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong></p>
<p>Two floated 50% width elements in a container that has an odd width will clear each other in Internet Explorer. One of them will always clear and move under to the next level.</p>
<p><strong>Reason</strong></p>
<p>This issue is due to IE&#8217;s way to calculate sub-pixel dimensions. Internet Explorer will approximate to the next higher integer any half-pixel dimension.</p>
<p>If you are dealing with two floated elements 50% in width that are nested in a 1001px width container, IE will not work with two 500.5px elements but two 501px ones. This is the reason why the last element in the sequence will always clear the other one, because they will not both fit the container&#8217;s given dimension.</p>
<p><strong>Example</strong></p>
<p><strong>CSS:</strong></p>
<pre>#container{
  width:1001px;
}
.floated{
  width: 50%;
  float: left;
}</pre>
<p><strong>HTML Markup</strong>:</p>
<pre>&lt;div id="container"&gt;
  &lt;div class="floated"&gt;
  ...
  &lt;/div&gt;
  &lt;div class="floated"&gt;
  ... 
  &lt;/div&gt;
&lt;/div&gt;</pre>
<p><strong>Browsers affected</strong></p>
<p>You will encounter this bug in IE6, IE7 and it is yet to be fixed in IE8.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitesizebugs.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitesizebugs.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitesizebugs.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitesizebugs.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitesizebugs.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitesizebugs.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitesizebugs.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitesizebugs.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitesizebugs.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitesizebugs.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitesizebugs.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitesizebugs.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitesizebugs.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitesizebugs.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=42&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitesizebugs.wordpress.com/2009/08/11/double-50-width-float-problem-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f5f207e26b3b032dfc15f98cf3168ce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bitesizebugs</media:title>
		</media:content>
	</item>
		<item>
		<title>Zero is &#8216;falsy&#8217; in JavaScript</title>
		<link>http://bitesizebugs.wordpress.com/2009/02/05/zero-is-falsy-in-javascript/</link>
		<comments>http://bitesizebugs.wordpress.com/2009/02/05/zero-is-falsy-in-javascript/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 15:35:53 +0000</pubDate>
		<dc:creator>bitesizebugs</dc:creator>
				<category><![CDATA[Front-end]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[false]]></category>
		<category><![CDATA[falsy]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[Number]]></category>
		<category><![CDATA[truthy]]></category>

		<guid isPermaLink="false">http://bitesizebugs.wordpress.com/?p=12</guid>
		<description><![CDATA[Numeric zero in JavaScript is a &#8216;falsy&#8217; value. If it is used in a conditional operator it will act as false. Example: var checkValue = function(value){ var check = ""; if(value){ check = "it was "+value; } else{ check = "no value"; } return check; } // number; returns "no value" console.log(checkValue(0)); // string; returns [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=12&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Numeric zero in JavaScript is a &#8216;falsy&#8217; value.<br />
If it is used in a conditional operator it will act as <code>false</code>.</p>
<p><strong>Example: </strong></p>
<pre style="font-size:12px;line-height:15px;">var checkValue = function(value){
    var check = "";

    if(value){
       check = "it was "+value;
    }
    else{
       check = "no value";
    }

    return check;
}

// number; returns "no value"
console.log(checkValue(0)); 

// string; returns "it was 0"
console.log(checkValue("0"));</pre>
<p><strong>Related reading:</strong></p>
<p><a title="About truthy and falsy values in JavaScript on 11Heavens" href="http://blog.nydd.org/2008/12/26/falsy-values-%E2%80%9Cjavascript-the-good-parts%E2%80%9D/" target="_blank">Falsy values</a> &#8211; extract from &#8220;JavaScript: The Good Parts&#8221;<a title="About truthy and falsy values in JavaScript on 11Heavens" href="http://11heavens.com/falsy-and-truthy-in-javascript" target="_blank"><br />
Truthy and falsy in JavaScript</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitesizebugs.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitesizebugs.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitesizebugs.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitesizebugs.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitesizebugs.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitesizebugs.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitesizebugs.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitesizebugs.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitesizebugs.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitesizebugs.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitesizebugs.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitesizebugs.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitesizebugs.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitesizebugs.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=12&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitesizebugs.wordpress.com/2009/02/05/zero-is-falsy-in-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f5f207e26b3b032dfc15f98cf3168ce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bitesizebugs</media:title>
		</media:content>
	</item>
		<item>
		<title>typeof NaN in JavaScript</title>
		<link>http://bitesizebugs.wordpress.com/2009/02/05/typeof-nan-in-javascript/</link>
		<comments>http://bitesizebugs.wordpress.com/2009/02/05/typeof-nan-in-javascript/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 14:28:28 +0000</pubDate>
		<dc:creator>bitesizebugs</dc:creator>
				<category><![CDATA[Front-end]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[NaN]]></category>
		<category><![CDATA[Number]]></category>
		<category><![CDATA[typeof]]></category>

		<guid isPermaLink="false">http://bitesizebugs.wordpress.com/?p=4</guid>
		<description><![CDATA[The typeof NaN in JavaScript is number. This is because NaN is a property of the Number object. Example: var num = Number("string value"); console.log(num); // returns NaN console.log(typeof num); //returns 'number' Background: NaN stands for Not-a-number. It is used to indicate that a value is not numeric.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=4&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The typeof NaN in JavaScript is number.<br />
This is because <a title="NaN documentation on Mozilla Developer Center" href="https://developer.mozilla.org/En/Sandbox/JS/NaN" target="_blank">NaN</a> is a property of the Number object.</p>
<p><strong>Example</strong>:</p>
<p><code>var num = Number("string value");<br />
console.log(num); // returns NaN<br />
console.log(typeof num); //returns 'number'</code></p>
<p><strong>Background:</strong></p>
<p>NaN stands for Not-a-number.<br />
It is used to indicate that a value is not numeric.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitesizebugs.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitesizebugs.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitesizebugs.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitesizebugs.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitesizebugs.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitesizebugs.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitesizebugs.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitesizebugs.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitesizebugs.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitesizebugs.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitesizebugs.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitesizebugs.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitesizebugs.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitesizebugs.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitesizebugs.wordpress.com&amp;blog=6463582&amp;post=4&amp;subd=bitesizebugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitesizebugs.wordpress.com/2009/02/05/typeof-nan-in-javascript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f5f207e26b3b032dfc15f98cf3168ce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bitesizebugs</media:title>
		</media:content>
	</item>
	</channel>
</rss>
