<?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; Code</title>
	<atom:link href="http://www.ianhoar.com/category/code/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>Mon, 16 Jan 2012 03:51:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>jQuery: How to get links to work in toggled or dynamic content</title>
		<link>http://www.ianhoar.com/2011/09/09/jquery-how-to-get-links-to-work-in-toggled-or-dynamic-content/</link>
		<comments>http://www.ianhoar.com/2011/09/09/jquery-how-to-get-links-to-work-in-toggled-or-dynamic-content/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 01:03:36 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[stopPropagation]]></category>
		<category><![CDATA[toggle]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=4473</guid>
		<description><![CDATA[jQuery still never ceases to amaze me. The developers of this fantastic library seem to have thought of everything, and the only real challenge for us end users is hunting through the API. Recently I was tasked with creating slide out toggle boxes that had links embedded within them. The problem was that the animation [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-4409" title="jQuery" src="http://www.ianhoar.com/wp-content/uploads/2011/06/jquery_logo.png" alt="jQuery" width="200" height="193" />jQuery still never ceases to amaze me. The developers of this fantastic library seem to have thought of everything, and the only real challenge for us end users is hunting through the API. Recently I was tasked with creating slide out toggle boxes that had links embedded within them. The problem was that the animation would be triggered before the links, thus rending them useless. Luckily like many things with jQuery the fix is simple and I will demonstrate with two examples.</p>
<p><span id="more-4473"></span></p>
<h2>The problem</h2>
<pre class="brush: jscript; title: ; notranslate">

$jQuery('#toggle-test').toggle(function() {
  $jQuery(this).stop(true, true).animate({width : 500});
}, function() {
  $jQuery(this).stop(true, true).animate({width : 300});
});
</pre>
<div id="toggle-test">Here is a block of content <a href="http://www.ianhoar.com">with an inline link</a> that is a fully toggleable div element, but the link does not actually work.</div>
<p>As you can see in the example above, when clicking the link the toggle animation is triggered instead of the link destination.</p>
<h2>The solution</h2>
<pre class="brush: jscript; title: ; notranslate">
$jQuery('#toggle-test2').toggle(function() {
  $jQuery(&quot;a&quot;).click(function(e) {
    e.stopPropagation();
  });
  $jQuery(this).stop(true, true).animate({width : 500});
}, function() {
  $jQuery(this).stop(true, true).animate({width : 300});
});
</pre>
<div id="toggle-test2">Here is a block of content <a href="http://www.ianhoar.com">with an inline link</a> that is a fully toggleable div element and a working link.</div>
<p>The difference with the second example is that we have added a click event within the toggle and added the <a href="http://api.jquery.com/event.stopPropagation/"><strong>stopPropagation()</strong> method</a>. This &#8220;Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event&#8221; thus allowing the link to take it&#8217;s normal course of action.</p>
<p>A more practical use of this would be clickable slide out boxes with links embedded or even a close button on a toggleable element. These are just some of the uses for <strong>stopPropagation()</strong>, so keep it handy in your arsenal of jQuery tools.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2011/09/09/jquery-how-to-get-links-to-work-in-toggled-or-dynamic-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery and Fancybox: How to automatically set the height of an iframe lightbox</title>
		<link>http://www.ianhoar.com/2011/08/25/jquery-and-fancybox-how-to-automatically-set-the-height-of-an-iframe-lightbox/</link>
		<comments>http://www.ianhoar.com/2011/08/25/jquery-and-fancybox-how-to-automatically-set-the-height-of-an-iframe-lightbox/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 00:34:32 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Fancybox]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[lightbox]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=4487</guid>
		<description><![CDATA[Fancybox is a pretty cool lightbox plugin for jQuery that I have been using for awhile now. It&#8217;s got a great feature set, looks good, and for the most part it just works out of the box. There is however one thing that was mind numbingly hard to figure out, and that was how to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://fancybox.net/"><img class="alignleft size-full wp-image-4409" title="jQuery" src="http://www.ianhoar.com/wp-content/uploads/2011/06/jquery_logo.png" alt="jQuery" width="200" height="193" />Fancybox</a> is a pretty cool lightbox plugin for jQuery that I have been using for awhile now. It&#8217;s got a great feature set, looks good, and for the most part it just works out of the box. There is however one thing that was mind numbingly hard to figure out, and that was how to automatically set the height of an iframe lightbox. Fancybox has this functionality built in for inline content via the autoDimensions key, which is set to true by default. Unfortunately this is not the case for iframes. After some hair pulling I managed to piece together an auto height solution for Fancybox iframes, but this technique could also be used without Fancybox to find the height of any iframe.</p>
<p><span id="more-4487"></span>Like most web challenges, the fix is quite simple, but almost every example I found always seemed to be missing one important piece of the puzzle.</p>
<pre class="brush: jscript; title: ; notranslate">
$(&quot;#lightbox&quot;).fancybox({
  'hideOnContentClick' : true,
  'width' : 500,
  'type' : 'iframe',
  'padding' : 35,
  'onComplete' : function() {
    $('#fancybox-frame').load(function() { // wait for frame to load and then gets it's height
      $('#fancybox-content').height($(this).contents().find('body').height()+30);
    });
  }
});
</pre>
<p>In the above example we have given our lightbox an id of #lightbox. We initialize the plugin with some options and give it a type option of iframe. Now you can create your separate HTML file for the lightbox and link to it form your main page and give the link href an id of #fancy-box. If you would like to use multiple lightboxes on one page you could use a class instead of an id.</p>
<p>The iframe height magic happens when the <strong>onComplete</strong> event is triggered. Here you can set up a call call jQuery&#8217;s <strong>load</strong> function which will then be used to call the height function after the iframe has loaded—you cannot get the height until the frame source has fully loaded. The id of #fancybox-content is the name of the div that Fancybox wraps the iframe in. We then set the <strong>height</strong> of that div by checking the <strong>contents</strong> of the iframe and using jQuery&#8217;s <strong>find</strong> method to locate the body tag and then get the <strong>height</strong>. I found that the height was always off by about 30 pixels, thus the +30. This may be due to paddings and margins within the loaded HTML file, but you can fiddle around with it until you get the right offset. You should now have an iframed lightbox that auto sizes its height.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2011/08/25/jquery-and-fancybox-how-to-automatically-set-the-height-of-an-iframe-lightbox/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Clearing the jQuery animation queue</title>
		<link>http://www.ianhoar.com/2011/06/05/clearing-the-jquery-animation-queue/</link>
		<comments>http://www.ianhoar.com/2011/06/05/clearing-the-jquery-animation-queue/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 05:45:39 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=4220</guid>
		<description><![CDATA[Ever see sites where a jQuery animation happens over and over when you rollover or click it multiple times. It&#8217;s almost as if the animations are stacking on top of one another in a queue and executing one by one, and guess what? That&#8217;s exactly what&#8217;s happening. Not to worry though, there is a simple [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-4409" title="jQuery" src="http://www.ianhoar.com/wp-content/uploads/2011/06/jquery_logo.png" alt="jQuery" width="200" height="193" />Ever see sites where a jQuery animation happens over and over when you rollover or click it multiple times. It&#8217;s almost as if the animations are stacking on top of one another in a queue and executing one by one, and guess what? That&#8217;s exactly what&#8217;s happening. Not to worry though, there is a simple and easy way to fix this.</p>
<p><span id="more-4220"></span></p>
<p>Below we have four examples, two jQuery toggles and two jQuery hovers. The first toggle and the first hover do not employ the <strong>stop()</strong> function while the proceeding ones do. Try them out for yourself.</p>
<h2>4 examples</h2>
<div id="examples">
<div id="example1">click with no stop</div>
<div id="example2">click with stop</div>
<div id="example3">hover with no stop</div>
<div id="example4">hover with stop</div>
</div>
<h2>No stop() function used</h2>
<pre class="brush: jscript; title: ; notranslate">
var height = $('#example1').height();
$('#example1').toggle(function() {
     $(this).animate({'height' : '100px'}, 'slow');
},
function() {
     $(this).animate({'height' : height}, 'slow');
});

$('#example3').hover(function() {
     $(this).animate({'height' : '100px'}, 'slow');
},
function() {
     $(this).animate({'height' : height}, 'slow');
});
</pre>
<p>The above examples first get the height of the example1 id, this height is then used for resetting all the examples to their original height after the first animation.</p>
<p>The snippet then sets the height the <strong>#example1</strong> element to 100px when toggled/clicked and then back to the original height when toggled again. The same logic is applied to <strong>#example3</strong> only with a hover instead.  If you rapidly click the first and third examples above you will see the animations queue up and continue repeating until finished. It is more noticeable with rollovers, and this is probably not a desirable behavior in most situations.</p>
<h2>Examples 2 and 4 use the jQuery stop function</h2>
<pre class="brush: jscript; title: ; notranslate">
$('#example2').toggle(function() {
     $(this).stop(true, true).animate({'height' : '100px'}, 'slow');
},
function() {
     $(this).stop(true, true).animate({'height' : height}, 'slow');
});
$('#example4').hover(function() {
     $(this).stop(true, false).animate({'height' : '100px'}, 'slow');
},
function() {
     $(this).stop(true, true).animate({'height' : height}, 'slow');
});
</pre>
<p>As you can see it&#8217;s pretty simple to fix, but you also have to be careful with the <strong>stop()</strong> function as sometimes you can get undesirable flicker effects.</p>
<h2>Understanding the stop() function</h2>
<p>The stop function takes two Boolean values, both of which default to false.</p>
<p><strong>.stop( [ clearQueue ], [ jumpToEnd ] )</strong></p>
<p>The first value <strong>clearQueue</strong> will stop the animation from stacking or queuing up each animation. The <strong>jumpToEnd</strong> value tells whether to finish or jump to the end of the animation sequence. You will often need to play around with these values to see what works best. As you can see in the hover example, the mouse over clears the queue but continues to animate, while the mouse out clears the queue and jumps to the end of the animation. If these values are all left to true in this example you can get some flickering effects.</p>
<p>Remember that the jQuery <strong>stop()</strong> function can be used on any animation function, which includes functions like <strong>slideUp()</strong> and <strong>SlideDown()</strong>. Happy coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2011/06/05/clearing-the-jquery-animation-queue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using custom CSS and Javascript in WordPress posts</title>
		<link>http://www.ianhoar.com/2011/04/02/using-custom-css-and-javascript-in-wordpress-posts/</link>
		<comments>http://www.ianhoar.com/2011/04/02/using-custom-css-and-javascript-in-wordpress-posts/#comments</comments>
		<pubDate>Sun, 03 Apr 2011 00:46:07 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=4279</guid>
		<description><![CDATA[Today while writing The secrets to using custom web fonts I ran into a bit of a snag. I wanted to show several CSS driven examples within the post, but the WordPress editor would remove anything I added. I have dealt with this issue in the past, usually in a clunky manner or even hosted [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-4312" title="Using custom CSS and Javascript in WordPress posts" src="http://www.ianhoar.com/wp-content/uploads/2011/04/tools.png" alt="Using custom CSS and Javascript in WordPress posts" width="200" height="147" />Today while writing <a href="http://www.ianhoar.com/2011/04/02/the-secrets-to-using-custom-web-fonts/">The secrets to using custom web fonts</a> I ran into a bit of a snag. I wanted to show several CSS driven examples within the post, but the WordPress editor would remove anything I added. I have dealt with this issue in the past, usually in a clunky manner or even hosted separate example pages. This time though I really wanted the font examples to show up within the actual page content and I didn&#8217;t want to add more styles to my WordPress theme. The method I used is remarkably easy and can be implemented in about two or three minutes.</p>
<p><span id="more-4279"></span></p>
<p>For custom CSS and JavaScript within the post, the best place to put these snippets is embedded right into the HTML head of that post. This is super easy to do with WordPress custom fields and a slight modification to your WordPress theme.</p>
<h2>What are custom fields?</h2>
<p><img class="alignright size-full wp-image-4315" title="Custom Field Screen Options" src="http://www.ianhoar.com/wp-content/uploads/2011/04/custom_field_screen_options.png" alt="Custom Field Screen Options" width="257" height="184" />If you don&#8217;t know what custom fields are in WordPress then step aboard, they are another powerful tool to add to your arsenal and easy to understand. The first step is making sure they are displayed on your <strong>Edit Post</strong> admin page. Create a new post and look to the top right corner of you admin interface. You should see <strong>Screen Options</strong>. Click it and then make sure <strong>Custom Fields</strong> is ticked in the <strong>Show on screen</strong> check box options. Now if you look below your post you should see a panel called Custom Fields.</p>
<h2>A quick update to your theme</h2>
<p>Either download your header.php file or use the WordPress editor to paste the snippet of code below into it. The snippet below should go right before your closing <strong>&lt;/head&gt;</strong> tag.</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
if (is_single()) {
     if ($custom_header = get_post_meta($post-&gt;ID, 'custom_header', true)) {
     echo $custom_header;
     }
}
?&gt;</pre>
<p>This example allows you to post any type of data into your page head and allows you to specify the type of tag such as <strong>link style</strong> or <strong>script</strong>. The code above says: is this a single page? If so get the custom field named <strong>custom_header</strong> and echo/print it out. Now you are done and can save/upload the file to your server.</p>
<p>Now in your custom fields panel enter a new custom field of custom_header and add the styles or JavaScript you need. In the example below you would then add .myCustomStyle to your post in the HTML tab. I find using <strong>span</strong> tags in the editor is the best way to add custom classes.</p>
<p><img class="size-full wp-image-4308 aligncenter" title="Custom Fields" src="http://www.ianhoar.com/wp-content/uploads/2011/04/custom_fields.png" alt="Custom Fields" width="681" height="344" /></p>
<p>You can add any kind of custom code into the header using the same method. Read more about <a href="http://codex.wordpress.org/Using_Custom_Fields">custom fields</a> in the <a href="http://codex.wordpress.org/Using_Custom_Fields">WordPress codex</a>.</p>
<h2>My custom CSS isn&#8217;t showing up</h2>
<p>If your CSS classes seem to be having no affect it&#8217;s probably because they are being overridden by your own theme CSS. Adding the <strong>!important</strong> declaration to any problem styles will fix this issue forcing them to override the style that is overriding your custom style, see the example below.</p>
<pre class="brush: css; title: ; notranslate">font-size:20px !important;
color:#1f1f1f !important;
</pre>
<p>That&#8217;s all there is to it, happy coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2011/04/02/using-custom-css-and-javascript-in-wordpress-posts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Doing JavaScript pop-up windows the right way</title>
		<link>http://www.ianhoar.com/2010/09/26/doing-javascript-popup-windows-the-right-way/</link>
		<comments>http://www.ianhoar.com/2010/09/26/doing-javascript-popup-windows-the-right-way/#comments</comments>
		<pubDate>Sun, 26 Sep 2010 18:07:37 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[pop-up]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=4018</guid>
		<description><![CDATA[Some would argue there is no right way to do a JavaScript pop-up since it disrupts the natural flow and usability of the web. I would tend to agree, but like all things web, there are exceptions to this rule and it may not be your choice anyway. That said there definitely is a very [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-4108" title="Bad pop-ups" src="http://www.ianhoar.com/wp-content/uploads/2010/09/upset.png" alt="Bad pop-ups" width="128" height="128" />Some would argue there is no right way to do a JavaScript pop-up since it disrupts the natural flow and usability of the web. I would tend to agree, but like all things web, there are exceptions to this rule and it may not be your choice anyway. That said there definitely is a very wrong way to do a JavaScript pop-up, and unfortunately there are literally hundreds of tutorials showing you how to do it the wrong way and even more websites implementing it wrong.</p>
<p><span id="more-4018"></span></p>
<p><strong>Using only JavaScript is the wrong way to do a pop-up</strong>. It&#8217;s not because JavaScript may be disabled; by now many websites would be completely broken without JavaScript and the expectation is that JavaScript is enabled. The reason for not using only JavaScript is<strong> accessibility and search engine optimization</strong>. First, pure JavaScript pop-ups will annoy power users who like to middle click links. I&#8217;m a middle click fiend and can have anywhere from 10 to 20 tabs open at any given time and pure JavaScript pop-ups take this expected functionality away. You are also crippling many search engines and thus harming your <acronym title="Search Engine Optimization">SEO</acronym> rankings.</p>
<h2>The easy but wrong way to do a pop-up</h2>
<pre>function badPopup() {
	window.open("http://www.ianhoar.com/", "window", "height=300,width=300" );
}

&lt;a onclick="badPopup()" href="#"&gt;Very bad pop-up&lt;/a&gt;</pre>
<p>The above function can also be done inline with an onclick too, but either way it&#8217;s not the right way to do a pop-up. You cannot middle click or right click it and search engines will have trouble following it.</p>
<h2>Some better ways to do a pop-up</h2>
<pre>function goodPopup(url) {
window.open(url, '_blank', 'scrollbars,resizable,height=300,width=300');
return false;
}

&lt;a onclick="return goodPopup(this.href)" href="http://www.ianhoar.com"&gt;Much better pop-up function&lt;/a&gt;</pre>
<p>The above function is a much better way to do a pop-up because you are <strong>passing the links href</strong> thus enabling the link to work without JavaScript. This means we can middle click it and right click it, access it with JavaScript disabled and search engines will have no problem following the link either.</p>
<p>If you need a quick and dirty one off pop-up you can use inline JavaScript.</p>
<pre>&lt;a href="http://www.ianhoar.com" onclick="window.open(this.href, this.target, 'height=300,width=300'); return false"&gt;Quick and dirty pop-up with inline javascript&lt;/a&gt;</pre>
<h2>Separating logic from markup</h2>
<p>Another way to create pop-ups is to use an event listener. That requires a bit more JavaScript and I would rather not re-invent the wheel and use a JavaScript library like jQuery.</p>
<pre>$(document).ready(function() {
	$('.pop-up').click(function() {
		url = $(this).attr('href');
		window.open(url, '_blank', 'scrollbars,resizable,height=300,width=300');
		return false;
	});
});

&lt;a href="http://www.ianhoar.com" class="pop-up"&gt;Separating logic from markup with jQuery&lt;/a&gt;</pre>
<p>This function turns anything with the pop-up class attached to it into a pop-up link. You could add more functionality to this function by adding multiple window sizes and attributes.</p>
<p>No matter which method you choose, steer clear of using only JavaScript to open windows. It&#8217;s easy to make your links more accessible, and if you don&#8217;t have time to set up functions, just use the quick and dirty inline method above.</p>
<p><a href="http://www.ianhoar.com/wp-content/uploads/2010/09/popup.html">Check out all of the examples</a> discussed in this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2010/09/26/doing-javascript-popup-windows-the-right-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to write super clean CSS</title>
		<link>http://www.ianhoar.com/2010/09/15/how-to-write-super-clean-css/</link>
		<comments>http://www.ianhoar.com/2010/09/15/how-to-write-super-clean-css/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 03:57:52 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=3754</guid>
		<description><![CDATA[Everyone who works with (X)HTML probably knows how to use CSS to some degree, but not as many know how to write clean CSS. Cascading Style Sheets are probably one of the most powerful tools a web designer/developer can master. It&#8217;s hard to find a site today that doesn&#8217;t benefit from the capabilities of CSS, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-4089" title="Clean CSS" src="http://www.ianhoar.com/wp-content/uploads/2010/09/clean_css.jpg" alt="Clean CSS" width="200" height="185" />Everyone who works with (X)HTML probably knows how to use CSS to some degree, but not as many know how to write clean CSS. Cascading Style Sheets are probably one of the most powerful tools a web designer/developer can master. It&#8217;s hard to find a site today that doesn&#8217;t benefit from the capabilities of CSS, and with the slow arrival of CSS3 that is unlikely to change. That said I still constantly come across style sheets that could be cleaner, more optimized, and more elegant.</p>
<p><span id="more-3754"></span></p>
<h2>Who cares if my CSS is clean or optimized</h2>
<p>There will always be people who don&#8217;t care, if it works it works, right? Why do you want to waste time cleaning up yoru CSS. Well the answer to that is twofold. The most obvious answer is that if you are not optimizing your CSS code base, it makes it larger and thus slower to load, but arguably this is a small issue for many websites and there are also automated compression tools. The second reason is far more important; messy CSS is hard to work with and wastes time and money, it&#8217;s as simple as that. The longer an unruly styles sheet grows the more unmanageable it becomes.  Even if you are the only one working with your styles, you can still benefit from clean CSS. This tutorial aims to make your CSS cleaner, faster, and far more manageable, so start working towards <strong>super clean CSS</strong>.</p>
<h2>Stop writing classes for HTML tags that already exist!</h2>
<p>You should never have something like &#8220;main-header&#8221; in your styles for a title you plan on using throughout the site.</p>
<p><strong>Avoid this:</strong></p>
<pre>.main-header {
     color:#green;
}</pre>
<p><strong>Do this instead:</strong></p>
<pre>#content h1 {
     color:#green;
}</pre>
<p>This is cleaner and less confusing. This goes for all the HTML formatting tags.  Also many web editors can apply header tags allowing a user to format pages nicely.</p>
<p><strong>Here are some more examples:</strong></p>
<pre>#content strong { color:green; }
#content p { color:blue; }
#content em { font-weight:bold; }
#content blockquote { margin:auto 20px; }</pre>
<p>Remember you can style any HTML element, so before creating a custom class, ask yourself this, <em>&#8220;is there a way I can style an HTML element instead&#8221;</em>.</p>
<h2>Make use of the body tag</h2>
<p>The body tag is another sometimes overlooked HTML tag that you can style. It can save you from declaring many styles over and over again throughout the stylesheet. Think about the style attributes that will be used the most throughout the site. Things like font-family, font-size, background-color and background-image. <strong>Declare your main font in the body tag</strong>, there is no reason to declare it anyway else. If you have a secondary font for headers then declare those in your header tags.</p>
<p><strong>An example:</strong></p>
<pre>body {
     font-family:Georgia, "Times New Roman", Times, serif;
     font-size:12px;
     color:#615a44;
     background:#f8eedb;
}</pre>
<h2>Redundancy and duplication, group your selectors</h2>
<p>This area is one of the biggest offenders for messy CSS, it&#8217;s also the place that can reduce the complexity of your styles the most when done right. If you  are using the same font for all your header tags, then there is no reason to  declare them for each and every header tag. The same holds true for any other  common styles.</p>
<p><strong>Avoid this:</strong></p>
<pre>#content h1 {
     font-family:Verdana, Geneva, sans-serif;
     color:green;
     font-weight:normal;
     font-size:20px;
     margin:10px 0 0 10px;
}

#content h2 {
     font-family:Verdana, Geneva, sans-serif;
     color:red;
     font-weight:normal;
     font-size:16px;
     margin:10px 0 0 10px;
}

#content h3 {
     font-family:Verdana, Geneva, sans-serif;
     color:blue;
     font-weight:normal;
     font-size:14px;
     margin:10px 0 0 10px;
}</pre>
<p><strong>Do this:</strong></p>
<pre>#content h1, #content h2, #content h3 {
     font-family:Verdana, Geneva, sans-serif;
     font-weight:normal;
     margin:10px 0 0 10px;
}

#content h1 {
     color:green;
     font-size:20px;
}

#content h2 {
     color:red;
     font-size:16px;
}

#content h3 {
     color:blue;
     font-size:14px;
}</pre>
<p>Now if you want to change the font-family or margins for all your  header selectors you can easily do it in one spot instead of three. Your  CSS is also now faster and easier to maintain. When building out your styles  think about what is redundant and how you can consolidate that redundancy into as little CSS as possible.</p>
<h2>Shorten your CSS</h2>
<p>This one is subjective, but try using short-hand CSS and declare all attributes at once. It&#8217;s faster to type, takes up less space and with time will be easier to read.</p>
<p><strong>Avoid this:</strong></p>
<pre>     background-color:#000;
     background image:url('images/my_cool_picture.png');
     background-repeat:no-repeat;</pre>
<p><strong>Do this:</strong></p>
<pre>     background:url('images/my_cool_picture.png') no-repeat #000;</pre>
<p>There&#8217;s a lot of CSS where you can short your declarations. In some cases you may want keep CSS declarations broken up for clarity, I find I tend to do this with font declarations, but use your discretion on this one.</p>
<p><strong>More examples of short-hand CSS</strong></p>
<p>You can declare font-size, line-height and font-family in one line.</p>
<pre>     font: 14px/20px Georgia, "Times New Roman", Times, serif;</pre>
<p>You can declare border-width, border-style and border-color in one line.</p>
<pre>     border:solid 1px #000;
     border-left: 1px solid #000;</pre>
<p>Margins and Paddings can also be done in one line. To remember think of a clock start at 12 going clockwise <strong>top, right, bottom left</strong>.</p>
<pre>     margin:5px 2px 12px 2px;
     padding:5px 2px 12px 2px;</pre>
<p>If you want to get really fancy and you have equal margins or paddings on top and bottom, and left and right you can do this.</p>
<pre>     margin:5px 2px;
     padding:5px 2px;</pre>
<p>If all sides are the same you can specify a single value.</p>
<h2>Watch the scope of your styles</h2>
<p>Try not to write styles that affect every HTML tag unless you absolutely want those style attributes applied throughout the site as a default style. Instead break down your CSS into manageable chunks. If you have different kinds of headers in your content than in your side bar then limit the style to that element.</p>
<p><strong>Avoid this:</strong></p>
<pre>h2 {
     color:green;
}</pre>
<p><strong>Do this:</strong></p>
<pre>#content h2 {
     color:green;
}
#sidebar h2 {
     color:blue;
}</pre>
<p>Now you have different h2 styles without custom classes or overriding anyone else&#8217;s styles.</p>
<h2>Short hand colours</h2>
<p>You can even specify some colours short hand. If the first three characters repeat themselves you can omit three of them. For example, black and white are #000000 and #ffffff.</p>
<p><strong>Do this:</strong></p>
<pre>#content h1 {
     color:#000;
}</pre>
<h2>Always improving your style</h2>
<p>CSS is something you can constantly improve. Over the years I have seen mine get better and better and as CSS3 is introduced into the mix things will only get better. A lot of the basics you apply here will carry over. If you have any of your own CSS time savers or tips, please post them in the comments section.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2010/09/15/how-to-write-super-clean-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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: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>3</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>1</slash:comments>
		</item>
		<item>
		<title>15 Awesome web design &amp; development sites you should know about</title>
		<link>http://www.ianhoar.com/2010/05/22/15-awesome-web-design-development-sites-you-should-know-about/</link>
		<comments>http://www.ianhoar.com/2010/05/22/15-awesome-web-design-development-sites-you-should-know-about/#comments</comments>
		<pubDate>Sat, 22 May 2010 23:05:26 +0000</pubDate>
		<dc:creator>Ian Hoar</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.ianhoar.com/?p=3774</guid>
		<description><![CDATA[This is a small list of invaluable websites I use to further my knowledge of everything web and to help out with inspiration, tools, resources and tutorials. It&#8217;s a list not aimed at any one facet of web design and development, but the many facets and processes that make a website possible. It is becoming [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-3930" title="Top Sites" src="http://www.ianhoar.com/wp-content/uploads/2010/05/top_sites.jpg" alt="Top Sites" width="200" height="268" />This is a small list of invaluable websites I use to further my knowledge of everything web and to help out with inspiration, tools, resources and tutorials. It&#8217;s a list not aimed at any one facet of web design and development, but the many facets and processes that make a website possible.</p>
<p>It is becoming more and more important to at least have a basic understanding of all the information that goes into making a fantastic website. Knowing limitations and pushing those limits makes web design and development fun, interesting, and challenging. If you work in this field you probably already know that web work is all about constantly learning new technologies, tools, tips and tricks.</p>
<p><span id="more-3774"></span></p>
<h2><a href="http://www.smashingmagazine.com">Smashing Magazine</a></h2>
<p><a href="http://www.smashingmagazine.com"><img class="size-full wp-image-3911 alignnone" title="Smashing Magazine" src="http://www.ianhoar.com/wp-content/uploads/2010/05/smashing_magazine.jpg" alt="Smashing Magazine" width="710" height="207" /></a></p>
<p>If you don&#8217;t know about this one then you have been missing out. While there is some fluff from time to time, you learn a lot from this site. There are a lot of top website and tools lists which can get tedious, but Smashing Magazine really does have the pulse of the web and this is the spot to be if you want to keep up to date on web trends. Some of their most popular posts are actually their trend posts. Critics will say that Smashing causes everyone to create the same type of designs, but I think it&#8217;s good to know what is working out there and what is not.</p>
<div class="callout"><strong>Focus: Tutorials, Everything web</strong><a href="http://www.smashingmagazine.com"><br />
www.smashingmagazine.com</a></div>
<h2><a href="http://www.noupe.com">Noupe</a></h2>
<p><a href="http://www.noupe.com"><img class="alignnone size-full wp-image-3912" title="Noupe" src="http://www.ianhoar.com/wp-content/uploads/2010/05/noupe.png" alt="Noupe" width="620" height="156" /></a></p>
<p>Noupe is part of the Smashing network. It has a huge amount inspirational lists and resources. When you need a break from work or if you are feeling creatively drained it can be a great quick stop for a creative inspirational recharge.</p>
<div class="callout"><strong>Focus: Inspiration, Resources</strong><br />
<a href="http://www.noupe.com">www.noupe.com</a></div>
<h2><a href="http://www.grafpedia.com/">Grafpedia</a></h2>
<p><a href="http://www.grafpedia.com/"><img class="alignnone size-full wp-image-3913" title="Grafpedia" src="http://www.ianhoar.com/wp-content/uploads/2010/05/grafpedia.jpg" alt="Grafpedia" width="585" height="160" /></a></p>
<p>Grafpedia is the holy grail of Photoshop web design tutorials. The site sells their templates, but the real guts of the site is the full on tutorials. You can create all of their PSD templates by following their extremely detailed tutorials. Most of us won&#8217;t want to do that of course, but browsing the designs until you see something that makes you say &#8220;how did they do that&#8221; and then getting a detailed play by play tutorial on just that question is pretty cool. A fantastic resource for Photoshop web design techniques. Also a great place to start if you are completely new to creating Photoshop mockups.</p>
<div class="callout"><strong>Focus: Photoshop Web Mockups, Design</strong><br />
<a href="http://www.grafpedia.com/">www.grafpedia.com</a></div>
<h2><a href="http://www.problogger.net">ProBlogger</a></h2>
<p><a href="http://www.problogger.net"><img class="alignnone size-full wp-image-3914" title="ProBlogger" src="http://www.ianhoar.com/wp-content/uploads/2010/05/pro_blogger.png" alt="ProBlogger" width="482" height="141" /></a></p>
<p>If you are a blogger, you should be reading this guys stuff. I started reading ProBlogger about two years ago. Some of the subject matter may be obvious for the more advanced bloggers, but you&#8217;ll probably gain new insights regardless of your skill level. Once you digest a lot of Darren&#8217;s site it does start to feel a bit regurgitated, but a quick visit every now and then always reveals something new for me. He also does a lot of his own tests and research on analytics and SEO. Problogger is also very professional and way less spamy than a lot of the get rich quick blogging tip sites out there.</p>
<div class="callout"><strong>Focus: Blogging, Writing, SEO, Monetization</strong><br />
<a href="http://www.problogger.net">www.problogger.net</a></div>
<h2><a href="http://ajaxian.com/">Ajaxian</a></h2>
<p><a href="http://ajaxian.com/"><img class="alignnone size-full wp-image-3915" title="Ajaxian" src="http://www.ianhoar.com/wp-content/uploads/2010/05/ajaxian.png" alt="Ajaxian" width="471" height="131" /></a></p>
<p>Ajaxian is for the more technically minded web designers and developers out there. As the name suggests they follow a lot of Ajax techniques, but the site has much more to offer than news about Ajax. If you want to know where the future of Web Apps are headed, this is a good starting point. Even if you are not a programmer, there&#8217;s a lot of cool bleeding edge stuff to see on this site.</p>
<div class="callout"><strong>Focus: Programming, Web Apps</strong><a href="http://ajaxian.com/"><br />
ajaxian.com</a></div>
<h2><a href="http://browserlab.adobe.com/">Adobe BrowserLab</a></h2>
<p><a href="http://browserlab.adobe.com/"><img class="alignnone size-full wp-image-3928" title="Adobe BrowserLab" src="http://www.ianhoar.com/wp-content/uploads/2010/05/adobe_browser_lab.jpg" alt="Adobe BrowserLab" width="507" height="180" /></a></p>
<p>The best way to really test your websites is with the actual browser, usually via a virtual machine. Not everyone has time to install a load of browsers under virtual machines and if you don&#8217;t need to test the functionality then Adobe BrowserLab is the answer to your testing needs. The layout is slick and easy to use. You can select all the browser you want to test with and save them. The site then quickly renders image screenshots of all the browsers you selected. The next time you need to test out good old IE6 or some other hard to find browser version, give it a try.</p>
<p><strong>Focus: Cross-browser testing</strong><a href="http://browserlab.adobe.com/"><br />
browserlab.adobe.com</a></p>
<h2><a href="http://www.webdesignerwall.com/">Web Designer Wall</a></h2>
<p><a href="http://www.webdesignerwall.com/"><img class="alignnone size-full wp-image-3917" title="Web Designer Wall" src="http://www.ianhoar.com/wp-content/uploads/2010/05/web_designer_wall.jpg" alt="Web Designer Wall" width="710" height="128" /></a></p>
<p>&#8220;A wall of design ideas, web trends, and tutorials.&#8221; This is another personal blog with a broad range of web design content. Tutorials, news, funky design techniques and everything in between. There&#8217;s a lot of content here and this guy posts often.</p>
<div class="callout"><strong>Focus: Tutorials, Web Design</strong><a href="http://www.webdesignerwall.com/"><br />
www.webdesignerwall.com</a></div>
<h2><a href="http://www.problogdesign.com">Pro Blog Design</a></h2>
<p><a href="http://www.problogdesign.com"><img class="alignnone size-full wp-image-3918" title="Pro Blog Design" src="http://www.ianhoar.com/wp-content/uploads/2010/05/pro_blog_design.jpg" alt="Pro Blog Design" width="490" height="217" /></a></p>
<p>This site has been around for a few years, but it only recently hit my radar. The focus is on web design with an emphasis on blogs. It&#8217;s got some fantastic tutorials and a lot of discussion.</p>
<div class="callout"><strong>Focus: Blogs, WordPress</strong><a href="http://www.problogdesign.com"><br />
www.problogdesign.com</a></div>
<h2><a href="http://www.webkitbits.com">WebKitBits</a></h2>
<p><a href="http://www.webkitbits.com"><img class="alignnone size-full wp-image-3919" title="WebKitBits" src="http://www.ianhoar.com/wp-content/uploads/2010/05/web_kit_bits.jpg" alt="WebKitBits" width="710" height="130" /></a></p>
<p>I recently discovered this gem of a site and it&#8217;s quickly becoming a favourite. WebKitBits is all about really cool projects done using the power of the Webkit rendering engine. Webkit is the browser engine built into Safari, Chrome, iPhone, Palm Pre, and Android, and it&#8217;s pretty awesome. This engine blows away Internet Explorer and even gives Gecko a run for it&#8217;s money. The stuff here is bleeding edge and some of it possibly years away before we see it in mainstream websites, but it will reignite you passion for everything web and you will be ready for the next wave of awesome.</p>
<div class="callout"><strong>Focus: Webkit Engine</strong><a href="http://www.webkitbits.com/"><br />
www.webkitbits.com</a></div>
<h2><a href="http://www.learningjquery.com/">Learning jQuery</a></h2>
<p><a href="http://www.learningjquery.com/"><img class="alignnone size-full wp-image-3920" title="Learning jQuery" src="http://www.ianhoar.com/wp-content/uploads/2010/05/learning_jquery.jpg" alt="Learning jQuery" width="505" height="118" /></a></p>
<p>jQuery should need no introduction by now and should be in every web designers arsenal. I would be lost without it or at least spending many more hours on my scripting. It&#8217;s the JavaScript framework library that went from &#8220;jWhat?&#8221; to &#8220;oh yeah, that&#8217;s easy we can do it with jQuery&#8221;. If you&#8217;re looking for people who know jQuery like the back of their hand, then this is the site for you as the authors share tips, techniques and tutorials and have written fantastic books on jQuery too.</p>
<div class="callout"><strong>Focus: jQuery</strong><a href="http://www.learningjquery.com/"><br />
www.learningjquery.com</a></div>
<h2><a href="http://www.brushking.eu/">BrushKing</a></h2>
<p><a href="http://www.brushking.eu/"><img class="alignnone size-full wp-image-3922" title="Brush King" src="http://www.ianhoar.com/wp-content/uploads/2010/05/brush_king.jpg" alt="Brush King" width="341" height="143" /></a></p>
<p>While not exactly a web design focused site this is still a must see for web designers. It&#8217;s a Photoshop brush site with loads of free brushes. There&#8217;s always that one brush that you can plop into a web page and just add that little bit of extra wow. The quality of most of the brushes is stunning.</p>
<div class="callout"><strong>Focus: Photoshop Brushes</strong><a href="http://www.brushking.eu/"><br />
www.brushking.eu</a></div>
<h2><a href="http://webdesignledger.com/">Web Design Ledger</a></h2>
<p><a href="http://webdesignledger.com/"><img class="alignnone size-full wp-image-3923" title="WDL" src="http://www.ianhoar.com/wp-content/uploads/2010/05/wdl.jpg" alt="WDL" width="401" height="169" /></a></p>
<p>Web Design Ledger or WDL for short is a web design knowledge and resources site. It&#8217;s another one of those fully loaded blogs that you can absorb information and inspiration from for hours. If you need a break from Smashing Magazine, check out Web Design Ledger.</p>
<div class="callout"><strong>Focus: Everything Web</strong><a href="http://webdesignledger.com/"><br />
webdesignledger.com</a></div>
<h2><a href="http://www.colourlovers.com/">COLOURlovers</a></h2>
<p><a href="http://www.colourlovers.com/"><img class="alignnone size-full wp-image-3924" title="Colour Lovers" src="http://www.ianhoar.com/wp-content/uploads/2010/05/colour_lovers.png" alt="Colour Lovers" width="677" height="98" /></a></p>
<p>Colour is so important, and COLOURlovers have got it covered. It&#8217;s basically a social media colour palette sharing site. Users share their colours, palettes, patterns and trends with the COLOURlovers community. The site is a great first step in the early design phase. They also oddly spell Colour correctly and incorrectly throughout the site.</p>
<div class="callout"><strong>Focus: Colour, Palettes, Patters</strong><a href="http://www.colourlovers.com/"><br />
www.colourlovers.com</a></div>
<h2><a href="http://net.tutsplus.com/">Nettuts +</a></h2>
<p><a href="http://net.tutsplus.com/"><img class="alignnone size-full wp-image-3925" title="Nettuts+" src="http://www.ianhoar.com/wp-content/uploads/2010/05/net_tuts_plus.jpg" alt="Nettuts+" width="710" height="121" /></a></p>
<p>This is another one of those massive resource sites out there that offers free content and premium content. Nettuts + is only part of their huge tutorial network. If you need information on a topic or just want to get exposed to new techniques and ideas than this is the place to go.</p>
<div class="callout"><strong>Focus: Everything Web</strong><a href="http://net.tutsplus.com/"><br />
net.tutsplus.com</a></div>
<h2><a href="http://www.alistapart.com/">A List Apart</a></h2>
<p><a href="http://www.alistapart.com/"><img class="alignnone size-full wp-image-3926" title="A List Apart" src="http://www.ianhoar.com/wp-content/uploads/2010/05/a_list_apart.png" alt="A List Apart" width="710" height="255" /></a></p>
<p>This list would not be complete without A List Apart. I my opinion this site is the de facto authority on best web practices and techniques. Many of the well known techniques used today originated on A List Apart. Although they don&#8217;t post near as much as some of the other sites listed here, the content is almost always top notch. The topics cover code, content, culture, design, process and user science. A lot of well known industry leaders and thinkers have written for A List Apart.</p>
<div class="callout"><strong>Focus: Everything Web</strong><a href="http://www.alistapart.com/"><br />
www.alistapart.com</a></div>
<h2>Did I miss something?</h2>
<p>If you think there is some awesome super duper resource that is missing from this list including your own site, please don&#8217;t hesitate to post it below in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ianhoar.com/2010/05/22/15-awesome-web-design-development-sites-you-should-know-about/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

