<?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>Ian Hoar – Passion for Technology – Geeking Out &#187; Tutorials</title>
	<atom:link href="http://www.ianhoar.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ianhoar.com</link>
	<description>Technology, Web, Toys, Games, Design, Entertainment, Gadgets, &#38; Geeking Out</description>
	<lastBuildDate>Sun, 11 Jul 2010 04:06:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Zen Coding &#8211; a new way to write HTML lightning fast</title>
		<link>http://www.ianhoar.com/2010/07/10/zen-coding-a-new-way-to-write-html-lightning-fast/</link>
		<comments>http://www.ianhoar.com/2010/07/10/zen-coding-a-new-way-to-write-html-lightning-fast/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 03:27:04 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Neato]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=4016</guid>
		<description><![CDATA[The other day I purchased a new editor called Coda. I might review this fantastic little piece of software at a later date, but one of the reasons I purchased it was to use some of the many plugins the community has created for it. One of these plugins has been produced for several editors [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-4050" title="Zen Bonsai" src="http://www.ianhoar.com/wp-content/uploads/2010/07/zen_bonsai.png" alt="Zen Bonsai" width="200" height="228" />The other day I purchased a <a href="http://www.panic.com/coda/">new editor called Coda</a>. I might review this fantastic little piece of software at a later date, but one of the reasons I purchased it was to use some of the many plugins the community has created for it. One of these plugins has been produced for several editors and could change how you code. It&#8217;s called <strong><a href="http://code.google.com/p/zen-coding/">Zen Coding</a></strong>, and it will make you write large chunks of HTML a lighting speeds.</p>
<h2>What is Zen Coding?</h2>
<p>Zen Coding is hard to explain, but if you have been working with HTML and CSS for awhile now you should be able to pick it up very quickly. It&#8217;s easy to learn and best shown by example, so lets start with an example.</p>
<p><span id="more-4016"></span></p>
<p>Say I want a <em>div</em> with an <em>id</em> of <em>frame</em> and a <em>class</em> of <em>indent</em>, I would type:</p>
<p><strong>div#frame.indent</strong></p>
<p>In the Coda editor hitting F1 would turn the above into this:<strong><br />
</strong></p>
<pre>&lt;div id="frame" class="indent"&gt;&lt;/div&gt;</pre>
<p>That&#8217;s pretty cool, but not life changing, but how about something like this.</p>
<p><strong>table&gt;tr*3&gt;td*4</strong></p>
<pre>&lt;table&gt;
	&lt;tr&gt;
		&lt;td&gt;&lt;/td&gt;
		&lt;td&gt;&lt;/td&gt;
		&lt;td&gt;&lt;/td&gt;
		&lt;td&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;&lt;/td&gt;
		&lt;td&gt;&lt;/td&gt;
		&lt;td&gt;&lt;/td&gt;
		&lt;td&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;&lt;/td&gt;
		&lt;td&gt;&lt;/td&gt;
		&lt;td&gt;&lt;/td&gt;
		&lt;td&gt;&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
</pre>
<p>Okay, I know what your saying, who needs complex tables anymore! Well, email newsletters and tabular data for one, but how about this.</p>
<p><strong>ul#navigation&gt;li.link*5</strong></p>
<pre>&lt;ul id="navigation"&gt;
	&lt;li class="link"&gt;&lt;/li&gt;
	&lt;li class="link"&gt;&lt;/li&gt;
	&lt;li class="link"&gt;&lt;/li&gt;
	&lt;li class="link"&gt;&lt;/li&gt;
	&lt;li class="link"&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>What if each link class needs to be unique?</p>
<p><strong>ul#navigation&gt;li.link-$*5</strong></p>
<pre>&amp;lt;ul id="navigation"&gt;
	&amp;lt;li class="link-1"&gt;&amp;lt;/li&gt;
	&amp;lt;li class="link-2"&gt;&amp;lt;/li&gt;
	&amp;lt;li class="link-3"&gt;&amp;lt;/li&gt;
	&amp;lt;li class="link-4"&gt;&amp;lt;/li&gt;
	&amp;lt;li class="link-5"&gt;&amp;lt;/li&gt;
&amp;lt;/ul&gt;</pre>
<p>How about adding a strong tag in each bullet.</p>
<p><strong>ul#navigation&gt;li.link-$*5&gt;strong</strong></p>
<pre>&lt;ul id="navigation"&gt;
	&lt;li class="link-1"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/li&gt;
	&lt;li class="link-2"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/li&gt;
	&lt;li class="link-3"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/li&gt;
	&lt;li class="link-4"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/li&gt;
	&lt;li class="link-5"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>Want a bunch of caption blocks?<br />
<strong>div.caption*5&gt;h1+h2+p</strong></p>
<pre>&lt;div class="caption"&gt;
	&lt;h1&gt;&lt;/h1&gt;
	&lt;h2&gt;&lt;/h2&gt;
	&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="caption"&gt;
	&lt;h1&gt;&lt;/h1&gt;
	&lt;h2&gt;&lt;/h2&gt;
	&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="caption"&gt;
	&lt;h1&gt;&lt;/h1&gt;
	&lt;h2&gt;&lt;/h2&gt;
	&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="caption"&gt;
	&lt;h1&gt;&lt;/h1&gt;
	&lt;h2&gt;&lt;/h2&gt;
	&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="caption"&gt;
	&lt;h1&gt;&lt;/h1&gt;
	&lt;h2&gt;&lt;/h2&gt;
	&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;</pre>
<p>Attributes? Got that covered too.</p>
<p><strong>a[href="link$.html" target="_blank"]*3</strong></p>
<pre>&lt;a href="link1.html" target="_blank"&gt;&lt;/a&gt;
&lt;a href="link2.html" target="_blank"&gt;&lt;/a&gt;
&lt;a href="link3.html" target="_blank"&gt;&lt;/a&gt;
</pre>
<p>Okay, it&#8217;s probably clear by now that I think Zen Coding is awesome and maybe I&#8217;m getting carried away now, but lets try one more. This one helped me post all the examples above to this post by using a filter. Adding a <em>|e</em> filter to the end of the above example will escape all unsafe XML characters with HTML entities. Perfect for posting code examples.</p>
<p><strong>a[href="link$.html" target="_blank"]*3|e</strong></p>
<pre>
&amp;lt;a href="link1.html" target="_blank"&amp;gt;&amp;lt;/a&amp;gt;
&amp;lt;a href="link2.html" target="_blank"&amp;gt;&amp;lt;/a&amp;gt;
&amp;lt;a href="link3.html" target="_blank"&amp;gt;&amp;lt;/a&amp;gt;
</pre>
<h2>Many editors are supported</h2>
<p>Don&#8217;t have coda? That&#8217;s not a problem, <a href="http://code.google.com/p/zen-coding/">many editors are supported</a> and chances are you are familiar with one of them. There&#8217;s even a PHP version called <a href="http://code.google.com/p/zen-php/">ZenPHP</a> which will generate blocks of HTML in a similar fashion. If you have any really cool Zen Coding selectors post them in the comments.</p>
<ul>
<li><a href="http://code.google.com/p/zen-coding/">Official Project site</a></li>
<li><a href="http://code.google.com/p/zen-coding/wiki/ZenHTMLSelectorsEn">More selector examples</a></li>
<li><a href="http://code.google.com/p/zen-coding/wiki/Filters">List of filters</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2010/07/10/zen-coding-a-new-way-to-write-html-lightning-fast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Outlook 2007 losing font-family declaration</title>
		<link>http://www.ianhoar.com/2010/06/27/outlook-2007-losing-font-family-declaration/</link>
		<comments>http://www.ianhoar.com/2010/06/27/outlook-2007-losing-font-family-declaration/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 23:35:11 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[email newsletters]]></category>
		<category><![CDATA[outlook]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=3861</guid>
		<description><![CDATA[Email clients are one of the pinnacle frustrations for web designers. The limitations are far greater than those of web browsers and you can always count on Microsoft&#8217;s Outlook 2007 being at the forefront of compatibility problems and bug issues. If you create emails that have to support Outlook 2007&#8242;s wonky Word rendering you may [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-3397" title="Outlook 2007" src="http://www.ianhoar.com/wp-content/uploads/2008/12/outlook_2007.jpg" alt="" width="150" height="147" />Email clients are one of the pinnacle frustrations for web designers. The limitations are far greater than those of web browsers and you can always count on Microsoft&#8217;s Outlook 2007 being at the forefront of compatibility problems and bug issues. If you create emails that have to support Outlook 2007&#8242;s wonky Word rendering you may have noticed on occasion that your specified <strong>font-family</strong> disappears. There&#8217;s a few ways to fix this, <strong>but some are better than others</strong>.</p>
<p><span id="more-3861"></span></p>
<h2>Keeping code clean in the messy world of email newsletters</h2>
<p>Obviously putting the <strong>font-family</strong> in the <strong>table</strong> or a surrounding <strong>div</strong> should do the trick, and it does for everything <strong>except Outlook 2007</strong>, for some reasons <strong>font-family</strong> declarations do not cascade. One easy but tedious way to fix this issue is to put inline styles all over the place. I don&#8217;t like this method, it makes it easy to forget sections of copy and it messy. I always especially <strong>avoid using inline styles on paragraph tags</strong>. You have have almost no control on the <strong>p</strong> tags anyway. Put everything you need in your <strong>td</strong> tags and leave your <strong>p</strong> tags clean.</p>
<p>So you might be thinking well then I&#8217;ll just add <strong>font-family</strong> declarations to all my <strong>td</strong> tags. Again this is slightly less messy, but still messy and our newsletters markup are awfully messy as it is. This is a place where you can <strong>use an embedded style</strong>. I know there are blanket rules like never user anything but inline styles, but this is not always the case, and blanket rules never benefit anyone. There are places for embedded styles, and they are even required in some cases for optimal cross client compatibility as I wrote about in &#8220;<a href="http://www.ianhoar.com/2008/12/06/outlook-2007-inline-styles-and-links/">Outlook 2007, inline styles, and links</a>&#8220;. The thing you must always remember when using embedded styles is that other email clients like Gmail are going to ignore them completely, so <strong>build in redundancies</strong>.</p>
<h2>Style the table data</h2>
<p>The fix is simple, you only need to declare your font-family twice. Use an inline style once in your <strong>table</strong>.</p>
<pre>&lt;table border="0" cellspacing="0" cellpadding="0" style="font-family:font-family:Verdana, Geneva, sans-serif;"&gt;
</pre>
<p>At the top of your page add this to your embedded style.</p>
<pre>&lt;style media="all" type="text/css"&gt;
td {
     font-family:font-family:Verdana, Geneva, sans-serif;
}
&lt;/style&gt;
</pre>
<p>Now you have made Outlook 2007 happy and given every <strong>td</strong> in your email newsletter a <strong>font-family</strong>. When the embedded style is stripped in other clients like Gmail you are still keeping the client happy, because <strong>other clients won&#8217;t ignore the font-family in the table tag</strong> and it will actually cascade throughout the document.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2010/06/27/outlook-2007-losing-font-family-declaration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix floated images and list overlap</title>
		<link>http://www.ianhoar.com/2010/05/24/lists-and-floated-images-without-overlap/</link>
		<comments>http://www.ianhoar.com/2010/05/24/lists-and-floated-images-without-overlap/#comments</comments>
		<pubDate>Tue, 25 May 2010 00:47:03 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=3987</guid>
		<description><![CDATA[The other day I was looking at my blog and saw that one of the posts had a left floated image followed by a bulleted list. The problem was that the list was not indenting properly the way it did when next to a paragraph without a floated element. After a bit of searching and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-4003" title="Bug" src="http://www.ianhoar.com/wp-content/uploads/2010/05/bug.png" alt="Bug" width="128" height="128" />The other day I was looking at my blog and saw that one of the posts had a left floated image followed by a bulleted list. The problem was that the list was not indenting properly the way it did when next to a paragraph without a floated element. After a bit of searching and hair pulling I found a discussion that solved my problem.</p>
<p><span id="more-3987"></span></p>
<h2>The problem illustrated</h2>
<p><img class="alignnone size-full wp-image-3990" style="margin-right: 10px;" title="Floated image incorrect" src="http://www.ianhoar.com/wp-content/uploads/2010/05/float_image_list_wrong.jpg" alt="Floated image incorrect" width="350" height="390" /><img class="alignnone size-full wp-image-3989" title="Floated image correct" src="http://www.ianhoar.com/wp-content/uploads/2010/05/float_image_list_correct.jpg" alt="Floated image correct" width="349" height="390" /></p>
<p>As you can see the list on the left image does not properly aligned, while the one on the right is. The fix is quite simple.</p>
<pre>ul, ol {
	overflow: hidden;
}
</pre>
<p>Use <strong>overflow:hidden</strong> on your <strong>ul</strong> and <strong>ol</strong> tags. This will stop your lists from flowing around images too, but that&#8217;s probably a good thing because a list flowing around an image isn&#8217;t every pleasing to the eyes.</p>
<h2>Getting it to work in IE6</h2>
<p>You didn&#8217;t think you were finished did you? When I did the redesign for ianhoar.com I really wasn&#8217;t sure if I would support Internet Explorer 6 at all, but in the end I decided that if I still have to support it on my professional projects then my blog should probably support this truly awful browser too.</p>
<p>The IE6 fix is a <strong>zoom:1</strong> declaration. Unfortunately the zoom declaration is not valid CSS. You can get around this by creating a second CSS file called ie.css and use conditional comments when linking the file.</p>
<pre>ul, ol {
	zoom:1;
}
</pre>
<h2>And the CSS conditional</h2>
<pre>&lt;!--[if IE 6]&gt;
	&lt;link rel="stylesheet" href="ie.css" mce_href="ie.css" type="text/css" media="all" /&gt;
&lt;![endif]--&gt;
</pre>
<p>Your lists should look a lot nicer now when situated next to floated images or other floated elements.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2010/05/24/lists-and-floated-images-without-overlap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating simple pure CSS buttons</title>
		<link>http://www.ianhoar.com/2010/05/15/creating-simple-pure-css-buttons/</link>
		<comments>http://www.ianhoar.com/2010/05/15/creating-simple-pure-css-buttons/#comments</comments>
		<pubDate>Sat, 15 May 2010 22:18:57 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=3864</guid>
		<description><![CDATA[This week I played around with some pure CSS button techniques. This style of button is clean looking and easy to set up, it even has slightly rounded corners. This is not the sliding doors technique which allows you to have full rounded corners, but it a variation, a little simpler and requires only one [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-3881" title="Pure CSS buttons" src="http://www.ianhoar.com/wp-content/uploads/2010/05/pure_css_buttons.png" alt="Pure CSS buttons" width="159" height="84" />This week I played around with some pure CSS button techniques. This style of button is clean looking and easy to set up, it even has slightly rounded corners. This is not the <a href="http://www.alistapart.com/articles/slidingdoors/">sliding doors technique</a> which allows you to have full rounded corners, but it a variation, a little simpler and requires only one image and one div tag in the markup. <a href="http://www.ianhoar.com/wp-content/uploads/2010/05/buttons_demo.html">Check out the working demo</a> and read on.</p>
<p><span id="more-3864"></span></p>
<h2>One image used twice</h2>
<p>The trick I use is simple, place the background image twice and offset the one on top by one pixel. For a grey button, the background would look like the one below with four 1px notches out of each corner. The size of the background is just to accommodate different sized buttons, so if you needed a wider button then you would need a wider background. Also, the gradient at the bottom will depend on the font size you use and the style you are looking for.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-3875" title="Grey background" src="http://www.ianhoar.com/wp-content/uploads/2010/05/btn_grey_bkg.png" alt="" width="379" height="186" /></p>
<p>In order to get these buttons to work in all browsers including our beloved IE6 and 7 they must all be floated left or right. If you do not need to support these browsers then you could use a <strong>display: inline-block</strong> which would make them even more flexible. Below is the CSS used to create a grey button.</p>
<pre>.clear {
	clear:both;
}
.left {
	float:left;
}
.right {
	float:right;
}
.btn a {
	white-space: nowrap;
	text-align: center;
	display: block;
	color:#fff;
	padding:1px 20px 5px 20px;
	font-family:Verdana, Geneva, sans-serif;
	font-size:12px;
	text-shadow: #3a0000 1px 1px 1px;
	text-decoration: none;
	font-weight:bold;
	position: relative;
	bottom:-1px;
	right:-1px;
	z-index: 1;
}
.grey {
	background:url(images/btn_grey_bkg.png) no-repeat top left;
	margin:5px;
}
.grey a {
	background:url(images/btn_grey_bkg.png) no-repeat bottom right;
}
</pre>
<p>And here is the HTML for the actual button.</p>
<pre>&lt;div class="btn grey left clear"&gt;
	&lt;a href="#"&gt;Grey&lt;/a&gt;
&lt;/div&gt;
</pre>
<h2>How it works</h2>
<p>As you can see the HTML snippet is very small and has several CSS classes. I like to break up my classes because I find it allows for much more flexibility. This way you can add which way you want the button to float, whether or not you want the floats to be cleared when beside other elements and what colour you would like to use. If we wanted to add red buttons we would simply create a red background and add the red CSS class.</p>
<pre>.red {
	background:url(images/btn_red_bkg.png) no-repeat top left;
	margin:5px;
}
.red a {
	background:url(images/btn_red_bkg.png) no-repeat bottom right;
}
</pre>
<p><strong>Followed by:</strong></p>
<pre>&lt;div  class="btn red left clear"&gt;
	&lt;a href="#"&gt;Red Button&lt;/a&gt;
&lt;/div&gt;
</pre>
<p><strong>Which would give us buttons like these:</strong></p>
<p><img title="Pure CSS buttons" src="http://www.ianhoar.com/wp-content/uploads/2010/05/pure_css_buttons_example.png" alt="Pure CSS buttons" width="710" height="68" /></p>
<p>The <strong>btn</strong> class does the bulk of the work, so lets walk through it.</p>
<ul>
<li>First we apply all these styles to the actual link within the div, thus <strong>.btn a</strong>.</li>
<li>The text align is only needed if you plan to add breaks to your buttons. One line of text will be padded and automatically be centered.</li>
<li>We apply a nowarp so the text does not wrap unless you force it too. You can add an HTML breaks <strong>(&lt;br /&gt;)</strong> in your button.</li>
<li>The <strong>display: block</strong> allows you to apply padding to the top and bottom of the anchor tag which by default is inline. It also makes the entire button clickable and not just the text.</li>
<li>The <strong>padding</strong> values can be tweaked to whatever you think looks good. This is where the text will situated within the button.</li>
<li><strong>font-family</strong>, <strong>font-size</strong>, <strong>text-shadow</strong>, <strong>text-decoration</strong> and <strong>font-weight</strong> are all optional and could be defined elsewhere in the CSS file. <strong>text-shadow</strong> looks great but does not work in any versions of Internet Explorer at the time of writing. Graceful degradation / progressive enhancement applies nicely.</li>
<li><strong>position: relative</strong>, allows us to offset the background image defined later in the colour class by <strong>bottom: -1px</strong> and <strong>right: -1px</strong>. This will make the background image within the colour anchor link offset so you still get the top and left sides of the bottom image.</li>
<li><strong>z-index:1</strong> forces the the anchor tag to the top which is necessary for IE6.</li>
</ul>
<h2>Taking it further</h2>
<p>These buttons are fairly flexible and easy to change. You could easily apply hover states and change the backgrounds. There is very little markup involved and that&#8217;s always a good thing in my books. I&#8217;m trying to move away from bulky markup with many divs. It will be nice when we can freely use multiple backgrounds on a single div and rounded corners with CSS3.</p>
<h2>Demo</h2>
<p><a href="http://www.ianhoar.com/wp-content/uploads/2010/05/buttons_demo.html">Check out the working demo</a> and feel free to post questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2010/05/15/creating-simple-pure-css-buttons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to clone / duplicate a VirtualBox VM on Mac OS X</title>
		<link>http://www.ianhoar.com/2010/05/05/how-to-clone-duplicate-a-virtualbox-vm-on-mac-os-x/</link>
		<comments>http://www.ianhoar.com/2010/05/05/how-to-clone-duplicate-a-virtualbox-vm-on-mac-os-x/#comments</comments>
		<pubDate>Thu, 06 May 2010 02:30:01 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=3809</guid>
		<description><![CDATA[The sad truth is that it&#8217;s becoming more and more important to cross test your markup on multiple browsers including Internet Explorer. Yes I&#8217;ve heard the announcement about IE6 being dead, but chances are you probably need multiple browsers, and graceful degradation / progressive enhancement should still be the ultimate goal for any web designer. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-3846" title="VirtualBox" src="http://www.ianhoar.com/wp-content/uploads/2010/05/VirtualBox.png" alt="VirtualBox" width="200" height="221" />The sad truth is that it&#8217;s becoming more and more important to cross test your markup on multiple browsers including Internet Explorer. Yes I&#8217;ve heard the announcement about <a href="http://ie6funeral.com/">IE6 being dead</a>, but chances are you probably need multiple browsers, and graceful degradation / progressive enhancement should still be the ultimate goal for any web designer.</p>
<h2>VirtualBox to the rescue</h2>
<p><a href="http://www.virtualbox.org/">VirtualBox</a> is a fantastic virtualization tool for Mac OS X, Windows, Linux and Solaris. I actually like it more than <a href="http://www.parallels.com/">Parallels</a>, and unlike Parallels, it&#8217;s free.  Setting up a virtual machine is pretty easy, but it&#8217;s a bit time consuming. Once you have a VM set up there doesn&#8217;t appear to be any quick way to duplicate the already working image. This tutorial will guide you through the steps needed to duplicate a VirtualBox image on Mac OS X.</p>
<p><span id="more-3809"></span></p>
<p>This tutorial assumes you have VirtualBox installed and a working VM already. If you are setting up a VM to test in Internet Explorer, then I recommend setting up the first image with IE6 and then duplicating and upgrading to IE7 and then duplicating again and upgrading to IE8 and no doubt soon to be, IE9.</p>
<h2>Lets get started</h2>
<p>First <strong>open your Finder</strong> and navigate to:</p>
<blockquote><p>YourUserName/Library/VirtualBox/HardDisks/</p></blockquote>
<p>Here you should see at least one or more <strong>vdi files</strong>. Take note of the one you want to copy. <strong>This tutorial will assume we are cloning Windows_XPIE7.vdi to Windows_XPIE8.vdi</strong>, remember these names will be replaced with your own vdi file name. Now you need to <strong>open the OS X Terminal</strong>. If you don&#8217;t know where this is, it&#8217;s called Terminal in your Applications/Utilities directory. Now change directories to VirtualBox. I usually type<strong> cd </strong>and then drag the file path from my Finder into the Terminal window, alternatively you can type it out:</p>
<blockquote><p>cd /Users/YourUserName/Library/VirtualBox/HardDisks</p></blockquote>
<p>VirtualBox comes with a command-line utility called <strong>VBoxManage</strong>. In the terminal windows type:</p>
<blockquote><p>VBoxManage clonehd Windows_XPIE7.vdi Windows_XPIE8.vdi</p></blockquote>
<p>This will take a minute or so. Once it is done you will have a clone of your vdi file and <strong>you will see a UUID: with a long string of string of letters and numbers</strong>. Copy this string, I recommend pasting it into a text editor for the moment or leaving the Terminal window open.</p>
<p>Now navigate back to the Finder:</p>
<blockquote><p>YourUserName/Library/VirtualBox/Machines/</p></blockquote>
<p><strong>Right click the Windows_XPIE7 directory and select Duplicate</strong>. <strong>Rename it to Windows_XPIE8</strong>. For consistency, inside this directory <strong>rename Windows_XPIE7.xml to Windows_XPIE8.xml</strong>. With a text editor open the renamed file.</p>
<p>In this file <strong>search for uuid</strong>. The first instance should be under Machine. Something like this:</p>
<pre>&lt;Machine uuid="{91ddb597-afe8-476a-b077-ef4575dca102}" name="Windows XPIE7" OSType="WindowsXP" lastStateChange="2010-05-04T02:15:21Z"&gt;</pre>
<p><strong>Paste the uuid</strong> that you saved from your clone here. (This does not need to be the exact same uuid, but it makes things easier.) Change the <strong>name</strong> to <strong>Windows XPIE8</strong>. This is the name that will show up in VirtualBox.</p>
<pre>&lt;Machine uuid="{81ddb597-afe8-476a-b077-ef4575dca102}" name="Windows XPIE8" OSType="WindowsXP" lastStateChange="2010-05-04T02:15:21Z"&gt;</pre>
<p>Now scroll down and look for a second uuid in the AttachedDevice element node, you will likely find more than one, but the one you are interested in has a type of &#8220;<strong>HardDisk</strong>&#8220;.</p>
<pre>&lt;AttachedDevice type="HardDisk" port="0" device="0"&gt;
    &lt;Image uuid="{5af3e1b9-e7c9-4a57-9251-a47d4adaca7c}"/&gt;
&lt;/AttachedDevice&gt;</pre>
<p>Here you want to paste the uuid you saved earlier over the old one. Save and close the file.</p>
<p>In the Finder navigate to:</p>
<blockquote><p>YourUserName/Library/VirtualBox/</p></blockquote>
<p>Open VirtualBox.xml in your text editor. Under the element <strong>MachineRegistry</strong> you will see <strong>MachineEntry elements</strong>. Copy one of these and <strong>update the uuid</strong> with the one you saved earlier.</p>
<pre>&lt;MachineRegistry&gt;
    &lt;MachineEntry uuid="{31ddb597-afe8-476a-b077-ef4575dca102}" src="Machines/Windows XP/Windows XP.xml"/&gt;
    &lt;MachineEntry uuid="{91ddb597-afe8-476a-b077-ef4575dca102}" src="Machines/Windows XPIE7/Windows XPIE7.xml"/&gt;
    &lt;MachineEntry uuid="{0158e13d-ef69-44cf-bb11-01755763f1ff}" src="Machines/Windows XPIE8/Windows XPIE8.xml"/&gt;
&lt;/MachineRegistry&gt;</pre>
<p>Now you need to change the HardDisks element. <strong>Add a new Hardisk element</strong> and <strong>change the uuid to the uuid</strong> you saved in your text editor.</p>
<pre>&lt;HardDisks&gt;
    &lt;HardDisk uuid="{be0d8b4a-ee99-410b-9d9e-a65d581479cf}" location="HardDisks/Windows XP.vdi" format="VDI" type="Normal"/&gt;
    &lt;HardDisk uuid="{5af3e1b9-e7c9-4a57-9251-a47d4adaca7c}" location="HardDisks/Windows XPIE7.vdi" format="VDI" type="Normal"/&gt;
    &lt;HardDisk uuid="{0158e13d-ef69-44cf-bb11-01755763f1ff}" location="HardDisks/Windows XPIE8.vdi" format="VDI" type="Normal"/&gt;
&lt;/HardDisks&gt;</pre>
<p>It seems like a lot of steps, but it&#8217;s actually a lot faster than re-installing the OS. Now you should be able to fire up VirtualBox and see your new VM listed. Now all you have to do is update your browser.</p>
<p><img class="aligncenter size-large wp-image-3849" title="VirtualBox screen" src="http://www.ianhoar.com/wp-content/uploads/2010/05/VirtualBox_screen1-710x592.png" alt="VirtualBox screen" width="710" height="592" /></p>
<p>This Tutorial was inspired by Josh Prowse&#8217;s YouTube tutorial. Mine is slightly updated for a new VirtualBox directory structure and I use the same uuid throughout.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="505" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/pjwbXLPR4Ig&amp;hl=en_US&amp;fs=1&amp;color1=0x2b405b&amp;color2=0x6b8ab6" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="505" src="http://www.youtube.com/v/pjwbXLPR4Ig&amp;hl=en_US&amp;fs=1&amp;color1=0x2b405b&amp;color2=0x6b8ab6" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2010/05/05/how-to-clone-duplicate-a-virtualbox-vm-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The mailto syntax; A comma may not work in Outlook Web Access</title>
		<link>http://www.ianhoar.com/2009/12/03/the-mailto-syntax-comma-does-not-work-in-outlook-web-access/</link>
		<comments>http://www.ianhoar.com/2009/12/03/the-mailto-syntax-comma-does-not-work-in-outlook-web-access/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 02:55:42 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=3714</guid>
		<description><![CDATA[The mailto syntax is pretty simple, but sometimes you might run into problems with some mail clients (AKA Outlook Web Access). Most of them are very forgiving and you can drop a comma for example right into the body of the mailto and have no problems, but it&#8217;s better not to do that. It&#8217;s much [...]]]></description>
			<content:encoded><![CDATA[<p>The mailto syntax is pretty simple, but sometimes you might run into problems with some mail clients (AKA Outlook Web Access). Most of them are very forgiving and you can drop a comma for example right into the body of the mailto and have no problems, but it&#8217;s better not to do that. It&#8217;s much safer if you use <a href="http://en.wikipedia.org/wiki/Hexadecimal">hexadecimal</a> numeric values for your special characters. For example a comma is %2c and a space is %20.</p>
<p><span id="more-3714"></span></p>
<h2>Why do I care? It works in the email clients I tested!</h2>
<p>That&#8217;s fine and dandy, but your audience may be using a client you haven&#8217;t tested, one like say Outlook for web. I dealt with an issue like this recently where Outlook was truncating the body copy after the first comma appeared. It was a mailto confirming attendance to an event, so losing the copy was not very helpful for for the end user or the organizer trying to get responses. Now granted a web form would have been a better option, but time restraints resulted in using a simple mailto.</p>
<p>Lets quickly go over some of the mailto syntax.</p>
<p><strong>Subject</strong></p>
<pre>mailto:me@myaddress.com?subject=Hello</pre>
<p><strong>Body</strong></p>
<pre><strong></strong>mailto:me@myaddress.com?body=I will be attending the party, it should be a blast</pre>
<p><strong>Subject and Body</strong></p>
<pre>mailto:me@myaddress.com?Hello&amp;body=I will be attending the party, it should be a blast.</pre>
<p>There  are also <strong>CC</strong> and <strong>BCC </strong>values that you can drop into your mailto string.</p>
<p>These examples will work fine in most email clients, but not all. First if you want valid XHTML syntax your ampersands should be &amp;amp;. This should not affect your mailto functionality either way, but having valid markup is always a good thing. Second you should use hexadecimal values for your spaces and commas. Here&#8217;s an example of a safer mailto.</p>
<p><strong>Subject and Body</strong></p>
<pre>mailto:me@myaddress.com?Hello&amp;amp;body=I%20will%20be%20attending%20the%20party%2c%20it%20should%20be%20a%20blast%2E</pre>
<p>The only difference with this example is %20 for spaces and %2c for commas and 2E for a period. This example is much more bullet proof than the first example although you probably don&#8217;t need it for the period, but then again I thought the comma would be safe.</p>
<p>Another character you may need is a line break. %0A will give you a line break. Using two will give you a paragraph space.</p>
<pre>mailto:me@myaddress.com?Hello&amp;amp;body=I%20will%20be%20attending%20the%20party%2c%20it%20should%20be%20a%20blast%2E%0A%0AI will be bringing a guest too%21%2E</pre>
<p>If you are ever unsure of a character just drop it&#8217;s hex value in place of it. Most of the characters should work fine, but some like the comma will not. Others like spacing must be added if breaks are needed. You can easily <a href="http://www.ascii.cl/htmlcodes.htm">find hexadecimal code lists</a> all over the web, just remember to add the percent (%) symbol in front of the hex.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2009/12/03/the-mailto-syntax-comma-does-not-work-in-outlook-web-access/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS tip, declare your font family once</title>
		<link>http://www.ianhoar.com/2009/10/01/css-tip-declare-your-font-family-once/</link>
		<comments>http://www.ianhoar.com/2009/10/01/css-tip-declare-your-font-family-once/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 21:47:11 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=3630</guid>
		<description><![CDATA[Here&#8217;s a CSS tip that I wish more people would follow. When setting up a font on your site, say Verdana, there is no reason to declare it on every H tag, P tag and class you are using. Throw it up in the body and be done with it. The same goes for font [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a <abbr title="Cascading Style Sheets">CSS</abbr> tip that I wish more people would follow. When setting up a font on your site, say Verdana, there is no reason to declare it on every H tag, P tag and class you are using. Throw it up in the body and be done with it. The same goes for font sizes, colours and anything else that will be uniform across the site. Once you have done this you can override it for specific tags and classes when you need too.</p>
<pre>body {
	font-family:Verdana, Arial, sans-serif;
	font-size:12px;
	margin:0;
	line-height:130%;
	color:#333333;
}</pre>
<p>This will make your life easier and everyone else who has to work with your files will thank you. I think we should always be looking for ways to make our CSS smaller, cleaner and easier to read.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2009/10/01/css-tip-declare-your-font-family-once/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Adobe Photoshop CS4: Blurry edges with the Rectangle Tool</title>
		<link>http://www.ianhoar.com/2009/04/27/adobe-photoshop-cs4-blurry-edges-with-the-rectangle-tool/</link>
		<comments>http://www.ianhoar.com/2009/04/27/adobe-photoshop-cs4-blurry-edges-with-the-rectangle-tool/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 03:56:15 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Frustration]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=3548</guid>
		<description><![CDATA[I was playing around with Photoshop CS4 and came across an odd setting. I&#8217;m not even sure what the default setting usually is, but for me it was my first time dealing with non-pixel perfect blurry rectangles in Photosohp and it really threw me for a loop. Below you can see two 60 pixel boxes [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-3553" title="Photoshop Icon" src="http://www.ianhoar.com/wp-content/uploads/2009/04/photoshop_icon.gif" alt="Photoshop Icon" width="120" height="116" />I was playing around with Photoshop CS4 and came across an odd setting. I&#8217;m not even sure what the default setting usually is, but for me it was my first time dealing with non-pixel perfect blurry rectangles in Photosohp and it really threw me for a loop. Below you can see two 60 pixel boxes created with the rectangle tool. Both boxes look the same, but upon further inspection you will see that the right box has blurry edges and the left box is pixel perfect and sharp.</p>
<p><span id="more-3548"></span></p>
<p><img class="size-full wp-image-3549" title="Photoshop rectangles 100 zoom" src="http://www.ianhoar.com/wp-content/uploads/2009/04/rectangles_100_zoom.gif" alt="Photoshop rectangles 100 zoom" width="156" height="85" /></p>
<p>Here are the two boxes zoomed to 300%.</p>
<p><img class="size-full wp-image-3550" title="Photoshop rectangles 300 zoom" src="http://www.ianhoar.com/wp-content/uploads/2009/04/rectangles_300_zoom.gif" alt="Photoshop rectangles 300 zoom" width="423" height="203" /></p>
<h2>What the $#%??</h2>
<p>This is enough to drive any web designer mad and I don&#8217;t really know what possible use the non pixel perfect box would have, but maybe that&#8217;s because I&#8217;m a web designer and I like clean straight edges and lines. Luckily this setting is super easy to turn off. Select the <strong>Rectangle tool</strong> then at the top of Photoshop click on the little arrow which will open the <strong>Geometry options</strong> for the rectangle. If you selected the <strong>Rectangle tool</strong>, you should be seeing the dialogue below.</p>
<p><img class="alignnone size-full wp-image-3551" title="Rectangle Options" src="http://www.ianhoar.com/wp-content/uploads/2009/04/rectangle_options.gif" alt="Rectangle Options" width="346" height="171" /></p>
<p>Select the <strong>Snap to Pixels</strong> option and now you will have clean pixel perfect rectangles. This option is also available for the <strong>Rounded Rectangle tool</strong>. No more blurry edges.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2009/04/27/adobe-photoshop-cs4-blurry-edges-with-the-rectangle-tool/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Internet Explorer 6 and redirected anchor links</title>
		<link>http://www.ianhoar.com/2008/11/16/internet-explorer-6-and-redirected-anchor-links/</link>
		<comments>http://www.ianhoar.com/2008/11/16/internet-explorer-6-and-redirected-anchor-links/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 21:25:39 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Frustration]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[ie6]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=3224</guid>
		<description><![CDATA[Why are my are my anchor links not working in IE6? As a web designer I constantly run into browser bugs and 90% of these bugs belong to either IE6 or IE7. Remarkably these two browsers don&#8217;t even consistently break the same way. What is messed up in IE6 may be completely messed up in [...]]]></description>
			<content:encoded><![CDATA[<h2><img class="alignleft size-full wp-image-110 thumbRight" title="Internet Explorer" src="http://blog.imhmedia.net/wp-content/uploads/2008/03/ie.jpg" alt="" width="150" height="144" />Why are my are my anchor links not working in IE6?</h2>
<p>As a web designer I constantly run into browser bugs and 90% of these bugs belong to either IE6 or IE7. Remarkably these two browsers don&#8217;t even consistently break the same way. What is messed up in IE6 may be completely messed up in a different way in IE7. The standards compliant WebKit and Gecko engines used by popular browsers like FireFox, Safari and Chrome rarely see many of these annoying bugs, but the masses use IE, so we as designers and developers must make them work.</p>
<p><span id="more-3224"></span></p>
<p>Fixing these bugs usually requires a lot of head scratching and pounding of fists and Google searches until I figure out a work around or hack that will fix it. I may not run across said bug for several months or even a year or more and then inevitably I stumble across the same bug and of course not realizing it is one I have dealt in the past. The IE6 redirect bug is one of those nasty ones that has caused me much pain and suffering, and it&#8217;s very simple to fix, although sometimes remembering the fix can take precious time, so I thought this time I would write it down and share it with others.</p>
<p>An anchor link, sometimes called a jump link, is pretty straight forward HTML, so you would think IE would have no problems with it. You would be wrong though, very wrong.</p>
<pre>&lt;a href="http://www.sitename.com/yourPage.html#AnchorName"&gt;Link to anchor on page&lt;/a&gt;</pre>
<p><strong>Within yourPage.html you have an anchor</strong></p>
<pre>&lt;a name="AnchorName"&gt;&lt;/a&gt;</pre>
<h2>This is where it all went wrong</h2>
<p>Under most circumstances this will work just fine, even in old clunky IE6, but where it won&#8217;t work is when there is a redirect involved. My issue started with an anchor link from an email campaign. This link would be clicked from an email client and then sent on to the email deployment platform, where it would then be redirected to the actual page. From here a nasty 404 would pop up. This is what threw me, because usually redirecting an anchor link in IE6 will only result in the anchor not working, but the page still loads fine.</p>
<h2>The fix</h2>
<p>The fix is quite simple if you can remember it the next time this happens to you.</p>
<pre>&lt;a href="http://www.sitename.com/yourPage.html&amp;#AnchorName"&gt;Link to anchor on page&lt;/a&gt;</pre>
<p>See the difference? No? Check out the little <strong>ampersand &#8220;&amp;&#8221;</strong> at the end of the html file and before the <strong>pound &#8220;#&#8221;</strong>. This will fix your broken anchor links in IE6 and they will now jump to where they are supposed to go.</p>
<p>My issue was a little more dire since the anchor links were actually breaking the page and giving a 404 error. We probably could have just ignored the issue if the jumping was the only thing broken. I think the reason for this is IE6 must parse the URL incorrectly when being redirected and ignore pound sign &#8220;#&#8221;. My page was a PHP file and contained a query string:</p>
<pre>yourPage.php&amp;var1=foo&amp;var2=bar#AnchoreName</pre>
<p>The last <strong>var2</strong> was interpreted as <strong>bar#AnchoreName</strong> instead of <strong>bar</strong>. An ampersand &#8220;&amp;&#8221; fixed this issue also. IE6 and IE7 never cease to amaze me with how badly they interprets the HTML and CSS specs. This particular bug is only an issue in IE6. I hope this saves some people a bit of sanity.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2008/11/16/internet-explorer-6-and-redirected-anchor-links/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Create a custom iPhone icon for your website</title>
		<link>http://www.ianhoar.com/2008/08/30/create-a-custom-iphone-icon-for-your-website/</link>
		<comments>http://www.ianhoar.com/2008/08/30/create-a-custom-iphone-icon-for-your-website/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 18:51:49 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Smartphones]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=1581</guid>
		<description><![CDATA[If you own an iPhone you may have noticed that you can bookmark websites and add them to your home screen. These are called Webclip Icons and they are either a snapshot of the website or an actual website icon similar to a favicon that shows up in a desktop browsers address field. If you [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-1590 thumbLeft" title="ianhoar.com iPhone WebClip" src="http://www.ianhoar.com/wp-content/uploads/2008/08/ian_hoar_iphone_icons.jpg" alt="ianhoar.com iPhone WebClip" width="166" height="206" />If you own an iPhone you may have noticed that you can bookmark websites and add them to your home screen. These are called Webclip Icons and they are either a snapshot of the website or an actual website icon similar to a favicon that shows up in a desktop browsers address field. If you want to add an iPhone icon to your site it&#8217;s very easy to do.</p>
<p><span id="more-1581"></span></p>
<p>First create your icon or grab your website logo. In my case I used the same logo as I used for my favicon which is the I in my name. You can make this any size you wish and it will be scaled up or down by the iPhone. I made mine a 57 x 57 pixel PNG which seems to be the size of icons when measure on screen. Anything smaller than this may appear blurry as the iPhone will upscale the image. Some people have used larger files and even jpgs without issue. Whatever size you choose, make sure the icon is square otherwise the iPhone will crop the image. Don&#8217;t worry about the icon glass effect or rounded corners, I will talk about this in a minute. The format that the iPhone does screenshots in is the PNG format and they will generally look better if done correctly, but they will be slightly larger in file size than a JPG.</p>
<p><strong>Update:</strong> Reader Tice wrote below that that the size Apple is using is 129 x 129 pixels. This is far larger than needed for current iPhone screens but I would imagine future proofs the icon for higher resolution iPhones that may be available in the years to come. The icon may also be used in other ways that I am not aware of. Link to Apple icon: <a href="http://www.apple.com/apple-touch-icon.png">http://www.apple.com/apple-touch-icon.png</a>.</p>
<p>Once you have your icon you can let an iPhone recognize it by one of two ways. Either save it as <strong>apple-touch-icon.png</strong> and add it in the root of your server, so in my case:</p>
<pre><a href="http://www.ianhoar.com/apple-touch-icon.png">http://www.ianhoar.com/apple-touch-icon.png</a></pre>
<p>Alternately, if you do not have access to the root or want multiple icons you can link to your icon in the head of your HTML.</p>
<pre>&lt;head&gt;
     &lt;title&gt;My Site&lt;/title&gt;
     &lt;link rel="apple-touch-icon" href="/directory/myicon.png" /&gt;
&lt;/head&gt;</pre>
<p>What about the glass effect and rounded corners? Well you don&#8217;t have to worry about those, the iPhone adds those effects for you, and that&#8217;s why all icons have a nice uniform look. Just upload the files and everything should be in working order. Here is an example of what my icon looks like before it shows up in an iPhone.</p>
<p style="text-align: center;"><img class="size-medium wp-image-1589 aligncenter" title="apple-touch-icon" src="http://www.ianhoar.com/wp-content/uploads/2008/08/apple-touch-icon.png" alt="apple-touch-icon" width="57" height="57" /></p>
<h2>Adding your icon goodness to the iPhones home screen</h2>
<p>If you don&#8217;t have an iPhone but want to have an icon available for iPhone users and you have followed these steps, your icon should now be working and available for iPhone users, of course you will not know for sure until you test it out for yourself.</p>
<p>Fire up Safari and load up your site. Then touch the little plus icon to add a bookmark, the screen below will pop up. Touch add to home screen and confirm, now you should have a nice glass icon somewhere on your home screen.</p>
<p style="text-align: center;"><img class="size-full wp-image-1591 aligncenter" title="iPhone Bookmark" src="http://www.ianhoar.com/wp-content/uploads/2008/08/iphone_bookmark.jpg" alt="iPhone Bookmark" width="320" height="480" /></p>
<h2>Move your icons around</h2>
<p>This may be obvious for some, if you would like to move your icon or any other icons on the home screen all you have to do is hold down on any icon. After a few seconds all the icons on the screen will start shaking and any you have added or installed will have little x marks beside them. These x marks are to remove or uninstall the link or app. To move an icon you can now just slide it around with your finger and even move if from screen to screen if you have multiple screens of icons. To set the icon just press the on button.</p>
<p style="text-align: center;"><img class="size-full wp-image-1588 aligncenter" title="iphone move" src="http://www.ianhoar.com/wp-content/uploads/2008/08/iphone_move_icon.jpg" alt="iphone move" width="320" height="480" /></p>
<p>For more information on resolution and size tips <a href="http://vjarmy.com/archives/2008/01/howto_iphone_webclip_icons.php">Dan Dickinson&#8217;s blog has a few other tips</a> if you run into any issues. Basically most of them come down to trying different resolutions, but I found the 57 x 57 worked out fine for me.</p>
<ul>
<li>Enjoy this post? <a href="http://www.ianhoar.com/feed/">Try the RSS feed</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2008/08/30/create-a-custom-iphone-icon-for-your-website/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>
