<?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>Amazing Coder &#187; Tutorials</title>
	<atom:link href="http://amazingcoder.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://amazingcoder.com</link>
	<description>Coding tips and tricks.</description>
	<lastBuildDate>Sat, 30 May 2009 10:16:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>New features in CSS3.</title>
		<link>http://amazingcoder.com/2009/04/17/new-features-in-css3/</link>
		<comments>http://amazingcoder.com/2009/04/17/new-features-in-css3/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 20:47:38 +0000</pubDate>
		<dc:creator>Lewis King</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Content]]></category>
		<category><![CDATA[Corners]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[ideas]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[Rounded]]></category>
		<category><![CDATA[shadows]]></category>
		<category><![CDATA[styling]]></category>

		<guid isPermaLink="false">http://amazingcoder.com/?p=377</guid>
		<description><![CDATA[CSS is my most loved syntax. It's simple, it's powerful, and it can make or break a site in seconds. Today, we're going to take a look at CSS3, the latest version of CSS, set to be launched in the near future. This includes some much requested features, and some nice added bonuses too. Without [...]]]></description>
			<content:encoded><![CDATA[<p>CSS is my most loved syntax. It's simple, it's powerful, and it can make or break a site in seconds. Today, we're going to take a look at CSS3, the latest version of CSS, set to be launched in the near future. This includes some much requested features, and some nice added bonuses too. Without further-a-do, lets dive straight in.<span id="more-377"></span><strong></p>
<p>1. Border radius.</strong></p>
<p>We've all seen it over the web. Rounded corners are everywhere. Before CSS3, you either needed to do it with images, or some special (or crazy) JavaScript. No longer. CSS3 has the ability to have rounded corners without the need to get things complicated. Standard HTML block elements are square-shaped with 90-degree corners. The CSS3 styling rule allows rounded corners to be set.</p>
<pre class="">
<span>-moz-border-radius: </span><span class="value">20px</span><span>;
-webkit-border-radius: <span class="value">20px</span><span>;
border-radius: <span class="value">20px</span><span>;
</pre>
<p></span></span></span></p>
<p>You can also target individual corners, for a nicer effect:</p>
<pre class="">
-moz-border-radius-topleft: 20px;
-moz-border-radius-topright: 20px;
-moz-border-radius-bottomleft: 10px;
-moz-border-radius-bottomright: 10px;
-webkit-border-top-right-radius: 20px;
-webkit-border-top-left-radius: 20px;
-webkit-border-bottom-left-radius: 10px;
-webkit-border-bottom-right-radius: 10px;
</pre>
<p>Supported in Firefox, Safari and Chrome. For an example, check <a href="http://twitter.com/amazingcoder">Twitter</a>. For more information, check <a href="http://www.css3.info/preview/rounded-border/">css3.info</a></p>
<h4>2. Border Images</h4>
<p>The next feature is a must. Before CSS3, borders had to be of a standard pattern, or just a simple line. Now, you can use your own images and create some stunning effects. This is how we do it:</p>
<pre class="">
border: 5px solid #cccccc;
-webkit-border-image: url(/images/border-image.png) 5 repeat;
-moz-border-image: url(/images/border-image.png) 5 repeat;
border-image: url(/images/border-image.png) 5 repeat;
</pre>
<p>This can also be applied on a per-side basis, allowing seperate images per side for that added sparkle.</p>
<pre class="">
border-bottom-right-image
border-bottom-image
border-bottom-left-image
border-left-image
border-top-left-image
border-top-image
border-top-right-image
border-right-image
</pre>
<p>Supported in Firefox 3.1, Safari and Chrome. For an example, see <a href="http://www.blog.spoongraphics.co.uk/">Blog.SpoonGraphics.</a> For more information, check <a href="http://www.css3.info/preview/border-image/">css3.info</a>.</p>
<h4>3. Drop Shadows!</h4>
<p>No more photoshop! No more photoshop! You now don't need photoshop to include drop shadows to your sites! Here's how it's done:</p>
<pre class="">
-webkit-box-shadow: 10px 10px 25px #ccc;
-moz-box-shadow: 10px 10px 25px #ccc;
box-shadow: 10px 10px 25px #ccc;
</pre>
<p>The first two attributes determine the offset of the shadow in relation to the element, in this case, 10 pixels on the x and y axis. The third attribute sets the level of blurriness of the shadow. And finally, the shadow color is set.</p>
<p>To do it on a text element:</p>
<pre class="">
text-shadow: 2px 2px 5px #ccc;
</pre>
<p>Supported in Firefox 3.1, Safari, Chrome (box-shadow only) and Opera (text-shadow only). For an example, please visit <a href="http://24ways.org/">24ways</a> For more information, visit <a href="http://www.css3.info/preview/box-shadow/">css3.info</a> (box) or <a href="http://www.css3.info/preview/text-shadow/">css3.info</a> (text)</p>
<h4>4. Transparency</h4>
<p>Before CSS3, PNG's played a vital part in Web Design. Now a CSS3 value lets you do the same, with a lot less time and effort needed. Here's how we do it in CSS now:</p>
<pre class="">
rgba(200, 54, 54, 0.5);
/* example: */
background: rgba(200, 54, 54, 0.5);
/* or */
color: rgba(200, 54, 54, 0.5);
</pre>
<p>The first three numbers refer to the red, green and blue color channels, and the final value refers to the alpha channel that produces the transparency effect. Alternatively, with the opacity rule, the color can be specified as usual, with the opacity value set as a separate rule:</p>
<pre class="">
color: #000;
opacity: 0.5;
</pre>
<p>Supported in Firefox, Safari, Chrome, Opera (opacity) and IE7 (opacity, with fixes). For an example, visit <a href="http://24ways.org/">24 Ways</a> (RGBA). For more information, visit: <a href="http://www.css3.info/preview/rgba/">css3.info</a></p>
<h4>5. @Font-Face</h4>
<p>There has always been a set of safe fonts that can be used on the Web, as you know: Arial, Helvetica, Verdana, Georgia, Comic Sans (ahem…), etc. Now the @font-face CSS3 rule lets you use whatever font you want. Easily. Here's how:</p>
<pre class="">
@font-face {
font-family:'Helvetica';
src: url('/images/Helvetica.otf') format('opentype');
}
</pre>
<p>The rest of the settings are then called as usual:</p>
<pre class="">
h1 { font-family: ‘Anivers’, Helvetica, Sans-Serif;
</pre>
<p>Supported in Firefox 3.1, Safari, Opera 10 and IE7 (with lots of fixes: if you are brave enough, you can make font-face work in IE <a href="http://jontangerine.com/log/2008/10/font-face-in-ie-making-web-fonts-work">(thanks for heads up, Jon Tan)</a>) For an example, please visit <a href="http://www.taptaptap.com/">TapTapTap</a>. For more information please visit <a href="http://www.css3.info/preview/web-fonts-with-font-face/">css3.info</a></p>
<p>Although CSS3 is still under development, the rules listed here are supported by some browsers right now. Safari in particular has extensive support for these new features. Unfortunately, despite being a top-quality browser, Safari has a relatively low number of users, so it is probably not worthwhile adding extra features solely for this group of users. But with Apple’s Mac computers making their way into everyday life, Safari’s usage is likely to continually increase. Assuming that most users of Firefox will update their browsers, there will soon be a large group of users with support for these new styling rules too.<br />
Google Chrome was released this year. Based on the WebKit engine, this browser has much of the same support as Safari. While Safari makes up a good proportion of Mac users, Chrome has burst onto the scene, making up a decent proportion of Windows users. According to statistics, almost 50% of all Internet users should be able to view these features.</p>
<h4>Downsides.</h4>
<p><strong>Internet Explorer: </strong>46% of Internet users won’t see these features, so don’t use them as a crucial part of the design of your website. Make sure that secondary options are in place.</p>
<p><strong>Invalid style sheets: </strong>These CSS3 features have not been released as a final specification. They are currently implemented with tags that target different browsers. This invalidates your style sheet and if you pride yourself on being "valid" don't use them.</p>
<p><strong>Extra CSS markup: </strong>Following the last point, having to add a different tag for each browser to specify the same rule, as well as include the standard rule for the final CSS specification, adds a lot of extra code to your CSS markup. Which means a bigger file, which means a slower site load.<br />
<strong><br />
Potentially horrific usage: </strong>Just as is done with traditional Photoshop filters, the use of these new styling features could result in some eye-wrenching designs. Drop shadows in particular.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazingcoder.com/2009/04/17/new-features-in-css3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Interview with Adelle Charles from the Fuel Brand Group</title>
		<link>http://amazingcoder.com/2009/04/17/interview-with-adelle-charles-from-the-fuel-brand-group/</link>
		<comments>http://amazingcoder.com/2009/04/17/interview-with-adelle-charles-from-the-fuel-brand-group/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 16:19:02 +0000</pubDate>
		<dc:creator>Luke Anderson</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[adelle]]></category>
		<category><![CDATA[charles]]></category>
		<category><![CDATA[creativity]]></category>
		<category><![CDATA[CSSEdit]]></category>
		<category><![CDATA[Designer]]></category>
		<category><![CDATA[fuel]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://amazingcoder.com/?p=382</guid>
		<description><![CDATA[Today, I have the privilege to be able to post this interview with Adelle Charles from the Fuel Brand Group. The Fuel Brand Group is made of 11 categories which are Fuel Your Creativity, Career, Marketplace, Toolbox, Interface, Ideas, Portfolio, Resume, Action, Branding and Networking. That's quite alot! The Fuel Brand Network is a group [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-394" style="margin-right:15px; margin-bottom:5px; float:left; clear:both;" src="http://amazingcoder.com/wp-content/uploads/2009/04/alc-headshot-150x150.jpg" alt="" width="150" height="150" />Today, I have the privilege to be able to post this interview with Adelle Charles from the Fuel Brand Group. The Fuel Brand Group is made of 11 categories which are Fuel Your <a href="http://www.fuelyourcreativity.com/">Creativity</a>, <a href="http://www.fuelyourcareer.com/">Career</a>, <a href="http://www.fuelyourmarketplace.com/">Marketplace</a>, <a href="http://www.fuelyourtoolbox.com/">Toolbox</a>, <a href="http://www.fuelyourcreativity.com/">Interface</a>, <a href="http://www.fuelyourideas.com/">Ideas</a>, <a href="http://www.fuelyourcreativity.com/">Portfolio</a>, <a href="http://www.fuelyourresume.com/">Resume</a>, <a href="http://www.fuelyouraction.com/">Action</a>, <a href="http://www.fuelyourbranding.com/">Branding</a> and <a href="http://www.fuelyournetworking.com/">Networking</a>. That's quite alot! <strong>The Fuel Brand Network is a group of sites dedicated to all things related to creative development. Whether it’s an idea, business or some other project you cooked up late one night… we aim to help creative persons like yourself not only get inspired, but also to give you a place where to come and grab the tools necessary to “fuel” your passions. (from: http://fuelbrandnetwork.com). </strong>If you've been able to take all that in, then the interview is below! Enjoy!<br />
<span id="more-382"></span></p>
<p><strong>1. First of all, Could you lead us through a brief history of your life? Where you live, what you do?</strong></p>
<p>I was born in Central NY and moved to Rochester, NY to attend college at Rochester Institute of Technology. There I studied Graphic Design and graduated with a BFA in 2001. I am the Creative Director at Fuel Brand Group where I am responsible for all of the design and the general creative direction of the Fuel Brand Group and its network of sites.</p>
<p><strong>2.How did you get started out on the web and what inspired you to get into coding?</strong></p>
<p>I’m not really a coder, I’m more of a designer. I’ve jumped into bits and pieces of it but I don’t consider myself a coder by any stretch of the imagination. I save that for the experts!</p>
<p><strong>3.What languages do you code and which one do you think is more 1. powerful, 2. simple and 3. you enjoy more? </strong></p>
<p>I enjoy English the best <img src='http://amazingcoder.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  I’m also a big fan of JQuery.</p>
<p><strong>4.What sites you use for inspiration and do you recommend any to our readers?</strong></p>
<p>I recommend Fuel Your Creativity, Design By Grid, Six Revisions, Web Designer Wall, and PatternTap.</p>
<p><strong>5.Do you have any other hobbies? If so what are they and why do you enjoy them?</strong></p>
<p>I enjoy hardworking because it gives me the chance to clear my head, so more ideas come to me!</p>
<p><strong>6.Do you run a PC, or a Mac, why?</strong></p>
<p>Mac…because apple kicks ass.</p>
<p><strong>7.What software couldn’t you live without and could you name 3 reasons?</strong></p>
<p>Photoshop because 1) ease of use, 2) &amp;3) Because I wouldn’t be able to do my job without it.</p>
<p><strong>8.What’s the program you use to code in? What is so good about it?</strong></p>
<p>The little coding I do is usually done in TextMate and CSS Edit. They just work for me.</p>
<p><strong>9.When you first started out, how did you promote yourself? </strong></p>
<p>When I first started out I dove into the blogging community and got my name out there by commenting. Twitter has also helped promote me and my sites.</p>
<p><strong>10. Finally, Where can we find you on the web, Be that you’re twitter, portfolio or other?</strong></p>
<p>Twitter: <a href="http://twitter.com/adellecharles">http://twitter.com/adellecharles</a><br />
Fuel Brand Group: <a href="http://fuelbrandgroup.com">http://fuelbrandgroup.com</a><br />
Fuel Labs: <a href="http://adellecharles.com/temp">http://adellecharles.com/temp</a><br />
Fuel Your Creativity: <a href="http://www.fuelyourcreativity.com">http://fuelyourcreativity.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://amazingcoder.com/2009/04/17/interview-with-adelle-charles-from-the-fuel-brand-group/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding &#8220;Readability&#8221; to your web site easily.</title>
		<link>http://amazingcoder.com/2009/04/02/adding-readability-to-your-web-site-easily/</link>
		<comments>http://amazingcoder.com/2009/04/02/adding-readability-to-your-web-site-easily/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 17:50:51 +0000</pubDate>
		<dc:creator>Daniel Matthews</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[readability]]></category>
		<category><![CDATA[reading]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://amazingcoder.com/?p=340</guid>
		<description><![CDATA[Web pages these days are all cluttered up with images, ads and videos, and it can be difficult to see through all that to the actual meat-and-potatoes of the page - the article. So much so that you miss things, and sometimes just give up reading through because the text size is too small, or the colours of the site mess with your eyes.

This quick tutorial will show you how to add a quick link to your site so that users can display your blog articles, help pages, or anything you want in a lovely, readable format. And it does so without the need for a new stylesheet.]]></description>
			<content:encoded><![CDATA[<p>Reading through twitter I stumbled across <a href="http://twitter.com/adactio/status/1370314821">this</a> tweet from Clearleft's Jeremy Keith. He mentioned a bookmarklet that adds readability to your site through removing distracting elements and increasing text size.</p>
<p>So i thought...well, why can't i add this bookmarklet to my site?, in case people want to read the articles that I've written without visual distraction. So I did, and you can see it on any of the single post pages on <a href="http://thepixeldistrict.com">my site.</a><br />
<img class="alignnone" style="margin-top: 10px; margin-bottom: 10px;" src="http://thepixeldistrict.com/amazingcoder/readability/bookmarksmall.png" alt="The Bookmark On My Site" width="257" height="35" /></p>
<p><span id="more-340"></span></p>
<p>It's really simple, just go to the <a href="http://lab.arc90.com/experiments/readability/">Arc90 Readability Bookmarklet Generator</a> and pick your settings, then right click on the bookmarklet, and select "copy link" or "copy link address", then all you have to do is set up a div with the text of your choice in it:</p>
<pre class="">&lt;div id="readability"&gt;&lt;p&gt;&lt;a href=" "&gt;Make This Post More Readable&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</pre>
<p>And set up some style rules in your CSS file for that DIV:</p>
<pre class=""> #readability {
background-image: url(images/readability.png);
background-position: 12px left;
background-repeat: no-repeat;
padding: 5px 5px 5px 24px;
}</pre>
<p>And then simply paste in the link from the bookmarklet into the 'href' field of your link:</p>
<pre class="">javascript:(function(){readStyle='style-novel';readSize='size-large';readMargin='margin-medium';_readability_script=document.createElement('SCRIPT');_readability_script.type='text/javascript';_readability_script.src='http://lab.arc90.com/experiments/readability/js/readability.js?x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(_readability_script);_readability_css=document.createElement('LINK');_readability_css.rel='stylesheet';_readability_css.href='http://lab.arc90.com/experiments/readability/css/readability.css';_readability_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_css);_readability_print_css=document.createElement('LINK');_readability_print_css.rel='stylesheet';_readability_print_css.href='http://lab.arc90.com/experiments/readability/css/readability-print.css';_readability_print_css.media='print';_readability_print_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_print_css);})();</pre>
<p>And you're done! don't forget to download the book icon (if you want it) from <a href="http://thepixeldistrict.com/amazingcoder/readability/readability.png">here</a>, the icon is from the awesome <a href="http://www.famfamfam.com/lab/icons/silk/">famfamfam silk icon set</a>. Don't forget to adjust the path to it in the CSS I gave you.</p>
<p>And the results speak for themselves, here is an article from the guardian before using readability:<br />
<a href="http://thepixeldistrict.com/amazingcoder/readability/before.png"><br />
<img src="http://thepixeldistrict.com/amazingcoder/readability/before.png" alt="Before Readability" width="450" /></a><br />
And After:<br />
<a href="http://thepixeldistrict.com/amazingcoder/readability/after.png"><br />
<img src="http://thepixeldistrict.com/amazingcoder/readability/after.png" alt="After Readability" width="450" /></a></p>
<p>So there! now your posts are more readable there's no excuse not to be writing top-notch content! Don't forget that you can style this to look like whatever you want! Enjoy...</p>
<h4>A Note On Browser Compatibility</h4>
<p>I can't see anything on the official website with regard to this, but i'd assume that it's fairly exclusive to modern browsers, and in the case of the IE's you should probably see it working with IE7+, but i can't verify that. But it should be fine in your Safari's, your Firefox's and your google Chrome's, as well as any other browser that is up to date.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazingcoder.com/2009/04/02/adding-readability-to-your-web-site-easily/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introducing: The Gallery!</title>
		<link>http://amazingcoder.com/2009/03/26/introducing-the-gallery/</link>
		<comments>http://amazingcoder.com/2009/03/26/introducing-the-gallery/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 21:09:39 +0000</pubDate>
		<dc:creator>Luke Anderson</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://amazingcoder.com/?p=365</guid>
		<description><![CDATA[Hey there! Today, we have some really awesome news! Remember that post when we said we were going to open a gallery? Well, guess what! It's happened, we now have an official Amazing Coder gallery. The gallery will actually launch tommorow (Friday 27th March) and will be updated every Friday. Remember to suggest your website(s) [...]]]></description>
			<content:encoded><![CDATA[<p>Hey there! Today, we have some really awesome news! Remember <a href="http://amazingcoder.com/2009/03/09/gallery-is-on-its-way/">that post</a> when we said we were going to open a gallery? Well, guess what! It's happened, we now have an <a href="http://amazingcoder.com/gallery/">official Amazing Coder gallery</a>. The gallery will actually launch tommorow (Friday 27th March) and will be updated every Friday. Remember to suggest your website(s) or anything you think that has a beautiful design and has been coded with loads of effort. We hope you enjoy it!</p>
]]></content:encoded>
			<wfw:commentRss>http://amazingcoder.com/2009/03/26/introducing-the-gallery/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Liven up your links with Scrollovers!</title>
		<link>http://amazingcoder.com/2009/02/28/liven-up-links-with-scrollovers/</link>
		<comments>http://amazingcoder.com/2009/02/28/liven-up-links-with-scrollovers/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 13:02:29 +0000</pubDate>
		<dc:creator>Luke Anderson</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Amazing]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Coder]]></category>
		<category><![CDATA[scrollovers]]></category>

		<guid isPermaLink="false">http://amazingcoder.com/?p=273</guid>
		<description><![CDATA[Scrollovers are a way to quickly and easily add flair to your web pages, giving your users an experience they weren't expecting. Scrollovers are a nice touch, but not everybody knows about it. In this tutorial, I will tell you how to get it, how to implement it, and how to use it. Read more to [...]]]></description>
			<content:encoded><![CDATA[<p>Scrollovers are a way to quickly and easily add flair to your web pages, giving your users an experience they weren't expecting. Scrollovers are a nice touch, but not everybody knows about it. In this tutorial, I will tell you how to get it, how to implement it, and how to use it. Read more to find out how.<span id="more-273"></span></p>
<p>**Before we start, please note that this script does NOT work in Safari 4**</p>
<p><strong>Step 1</strong><br />
Download the script by <a href="http://www.scrollovers.com/js/scrollovers.js">clicking this link</a> (right-click and save target as).</p>
<p><strong>Step 2</strong><br />
Now, we have to add in the code to the page. Let's say we're adding the code to Amazing Coder's homepage: (the Scrollovers code is in bold).</p>
<p><code> </code></p>
<p><code> </code></p>
<p><code></p>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head profile="http://gmpg.org/xfn/11"&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
&lt;title&gt;Amazing Coder&lt;/title&gt;
&lt;meta name="generator" content="WordPress 2.7.1" /&gt; &lt;!-- leave this for stats --&gt;
&lt;link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://amazingcoder.com/feed/" /&gt;
&lt;link rel="alternate" type="text/xml" title="RSS .92" href="http://amazingcoder.com/feed/rss/" /&gt;
&lt;link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="http://amazingcoder.com/feed/atom/" /&gt;
&lt;link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://amazingcoder.com/xmlrpc.php?rsd" /&gt;
&lt;link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://amazingcoder.com/wp-includes/wlwmanifest.xml" /&gt;
<strong><em>&lt;script type="text/javascript src="http://amazingcoder.com/wp-content/themes/amazingcoder/scrollovers.js"&gt;&lt;/script&gt;</em></strong>
&lt;/head&gt;</pre>
<p></code></p>
<p>We'll also need to add in the CSS after the &lt;head&gt; tag:</p>
<p><code> </code></p>
<p><code> </code></p>
<p><code></p>
<pre>&lt;style&gt;
a.scrollover {
/* Default Colour/Styles here */
color: #0C3;
}
a.scrollover em:first-line {
/* Rollover Colour/Styles here */
color: #F93;
}
&lt;style&gt;</pre>
<p></code></p>
<p><strong>Step 3</strong><br />
Now we have to add it to one of our links. I've just created an example page, to display them. This is some code extracted from the page:</p>
<p><code> </code></p>
<p><code> </code></p>
<p><code></p>
<pre>&lt;a href="#" class="scrollover" type="scrollover"&gt;Example Link 1&lt;/a&gt;</pre>
<p></code></p>
<p><strong>You can view the live demo here: <a href="http://lpanderson.net/tutorial1/">http://lpanderson.net/tutorial1/</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://amazingcoder.com/2009/02/28/liven-up-links-with-scrollovers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery &#8211; Javascript For The Rest Of Us</title>
		<link>http://amazingcoder.com/2009/02/27/jquery-javascript-for-the-rest-of-us/</link>
		<comments>http://amazingcoder.com/2009/02/27/jquery-javascript-for-the-rest-of-us/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 16:09:59 +0000</pubDate>
		<dc:creator>Daniel Matthews</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[colour]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Designer]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[fade]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[movement]]></category>
		<category><![CDATA[paragraph]]></category>
		<category><![CDATA[skills]]></category>

		<guid isPermaLink="false">http://amazingcoder.com/?p=247</guid>
		<description><![CDATA[Javascript is an amazing scripting language, but it can take a long time to learn properly, and even then, it can take a long time to script out long winded pieces of code to achieve even the most basic of actions.

That’s where jQuery comes in, it’s a framework that is heavily based around CSS, and it’s easy to learn, even for people who don’t have a mind for scripting.

So i present to you an introduction to the basic principles of writing code with jQuery, and the sort of things you can do with just two snippets.]]></description>
			<content:encoded><![CDATA[<p>jQuery is a freely available, extremely extensible library of javascript actions, effects and more, and is written with it’s own API of sorts, that means that instead of writing lots and lots of standard javascript code, you can use a shorthand version that reduces the time you spend writing code, but produces some awesome effects.</p>
<p>The best part is that it works tightly with CSS, so if you’re a designer, you already have about 80% of the skills needed to program actions in jQuery!<span id="more-247"></span></p>
<h4>Why jQuery?</h4>
<p>Because it’s probably the most widely used and widely extended javascript library around, a lot of people seem to know it, so support is usually not far away, and in my personal opinion, i think it’s the most intuitive to designers.</p>
<h4>Ready?</h4>
<p>Ok then, let’s get started...</p>
<p>Firstly, copy the below code into a blank HTML document, this is the basic page structure that we’re going to work with, and a little bit of CSS in the head section to control what certain elements on the page look like.</p>
<pre class="">
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<span> </span>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
&lt;head&gt;
<span> </span>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"/&gt;
<span> </span>&lt;title&gt;jQuery!&lt;/title&gt;
<span> </span>
<span> </span>
<span> </span>
<span> </span>&lt;style type="text/css"&gt;
<span> </span>
<span> </span>p.ourParagraph {
<span> </span>padding:10px;
<span> </span>border:5px solid #947d5f;
<span> </span>background-color: #d3b287;
<span> </span>width:500px;
<span> </span>margin-left: auto;
<span> </span>margin-right: auto;
<span> </span>margin-top:50px;
<span> </span>color:#fff;
<span> </span>}
<span> </span>
<span> </span>&lt;/style&gt;
<span> </span>&lt;/head&gt;
&lt;body&gt;
&lt;a class="showParagraph" href="#"&gt;Show The Paragraph&lt;/a&gt; |
&lt;a class="manipulateCSS" href="#"&gt;Manipulate The CSS&lt;/a&gt; |
&lt;a class="reset" href="#"&gt;Reset Everything&lt;/a&gt;
&lt;p class="ourParagraph" id="main"&gt;Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus&lt;/p&gt;
&lt;p class="ourParagraph"&gt;Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus&lt;/p&gt;
<span> </span>
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>You’ll notice there are two paragraph elements, both have a class name “ourParagraph” applied to them, which is why they look the same, but the top one has an ID attribute as well, more about why later.</p>
<p><a href="http://amazingcoder.com/wp-content/uploads/2009/02/screenshot1.png"><img class="size-medium wp-image-270 alignnone" src="http://amazingcoder.com/wp-content/uploads/2009/02/screenshot1-288x300.png" alt="screenshot1" width="288" height="300" /></a></p>
<p>Remember to save your HTML file in the root folder of your site, and make sure the path to jQuery is correct in the script tag.</p>
<h4>Including jQuery on your site...</h4>
<p>You’ll need to head over to the jQuery web site and download the latest release, don’t worry too much about the compression options, just use the default setting (production).</p>
<p>Then you’ll need to place jQuery either in the root folder of your site, or in a “js” or “javascript” folder, i’ve chosen the former. You then insert this snippet of code into the top of your page:</p>
<pre class="">&lt;script type="text/javascript" src="js/jquery-1.2.6.min.js"&gt;&lt;/script&gt;</pre>
<p>Of course, the “src” path will depend on where you chose to store your jQuery file, so adjust accordingly.</p>
<h4>(Document).Ready?</h4>
<p>The first thing I'm going to go over is using the document ready function. This checks to see if the DOM is loaded and ready to be played with using javascript.</p>
<pre class="">
$(document).ready(function() {
/* Anything you want to happen when you load the page goes here */
});
</pre>
<p>Then inside this little command, you can tell the script to hide any elements with the class of “ourParagraph” (which we have two of). You do this by looking for elements similar to the way you would with CSS:</p>
<pre class="">
$(document).ready(function() {
/* Tell it to hide any elements with a class of “ourParagraph” */
$(“.ourParagraph”).hide();
});
</pre>
<p>Now refresh your page, you should see the two brown-backgrounded paragraphs dissapear, if it works, congratulations, you just wrote some jQuery, if not, make sure that you’ve typed everything correctly (don’t copy and paste or it’ll never stick in your head!), and also check that you’ve included your jQuery library file correctly, and that it’s in the right place.</p>
<p>Now let’s just take a look at what we just did...</p>
<pre class="">
// We said “when the page is ready to be manipulated:
$(document).ready(
// Do this:
function () {
// Take this element:
$(“.ourParagraph”)
// And Hide it:
.hide();
// Then we close up the loose ends:
});
</pre>
<p>There, simple. And this is the style of coding for most of jQuery’s effects and interactions with your page.</p>
<h4>Let’s get the paragraph back...</h4>
<p>Notice there’s a link element in there with a class of “showParagraph”? well we’re going to use that class to tell jQuery to show the paragraphs again when the link is clicked. So, inside you’re document ready function, insert this code:</p>
<pre class="">
$(“.showParagraph”).click(function() {
$(“.ourParagraph”).show();
});
</pre>
<p>This is simply doing the opposite of our .hide() piece of code, but doing it only when we click the link, not straight away when the document is ready. You should now be able to refresh the page, click the “show the paragraph” link, and they will both pop into view.</p>
<p>Note that the link elements in our page have a value of href=”#”, this is the most basic way of creating a link that doesn’t navigate to any page when clicked on, but can still be used to manipulate things with javascript.</p>
<h4>Adjusting CSS, without refreshing the page!</h4>
<p>This is one of the coolest features of jQuery is it’s shorthand for adjusting CSS properties of page elements. We’re going to target a specific element in the page, one of the paragraphs, which is why i attached an ID to one of them.</p>
<pre class="">
/* when you click the <a> with the class “manipulateCSS”... */
$(“.manipulateCSS”).click(function() {</a>
<a>/*Target the paragraph with ID “main” and adjust the following CSS properties */</a>
<a>$("#main").css({'background-color' : 'red', 'width' : '200px'});</a>
<a>/* Close up the loose ends */
});
</pre>
<p></a></p>
<p><a>This will adjust one of the paragraphs’ widths and background colour. Refresh your page and see for yourself! You should see the first paragraph element turn red and get thinner.</a></p>
<p><a href="http://amazingcoder.com/wp-content/uploads/2009/02/screenshot2.png"><img class="size-medium wp-image-271 alignnone" src="http://amazingcoder.com/wp-content/uploads/2009/02/screenshot2-300x208.png" alt="screenshot2" width="300" height="208" /></a></p>
<p><a>The possibilities for this interaction are endless! you can adjust where things are on the page, change their typography, and make things bigger, all from one command in jQuery.</a></p>
<p><a></a></p>
<p><a></a></p>
<p><a> </a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></a></p>
<p><a> </a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></a></p>
<p><a> </a></p>
<p><a></a></p>
<p><a></p>
<h4>Now to reset everything...</h4>
<p>Just quickly, as a final piece of functionality to this tutorial, combine the two pieces of code from before to create a simple reset function that will hide the paragraphs and reset the CSS of the manipulated paragraph back to what it was before:</p>
<pre class="">
/* When we click the link with class “reset” */
$(".reset").click(function() {
/* Hide the paragraphs */
$(".ourParagraph").hide();
/* Reset the css back to normal */
$(".ourParagraph").css({'background-color' : '#d3b287', 'width' : '500px'});
/* close up the loose ends */
});
</pre>
<p>There we go, refresh your page and click through the links in order, and you get a nice sequence of events. Hidden, show, manipulate, reset.</p>
<p>So that pretty much wraps up this very basic tutorial on using jQuery, remember to head over to the jQuery website where they have a lot of great tutorials, and you can also read the documentation, in which you’ll find the effects, which are the most fun part of jQuery <img src='http://amazingcoder.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>So enjoy, and please let me know how I could improve this tutorial, constructive criticism only please.</p>
<p></a></p>
<p><a>You can download the files for this tutorial </a><a href="http://amazingcoder.com/wp-content/uploads/2009/02/jquery-tutorial-finished-product.zip">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://amazingcoder.com/2009/02/27/jquery-javascript-for-the-rest-of-us/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Screencast: Twitter</title>
		<link>http://amazingcoder.com/2009/02/23/screencast-twitter/</link>
		<comments>http://amazingcoder.com/2009/02/23/screencast-twitter/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 16:08:14 +0000</pubDate>
		<dc:creator>Lewis King</dc:creator>
				<category><![CDATA[Screencast]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[AIP]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Mashups]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tweet]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://amazingcoder.com/?p=238</guid>
		<description><![CDATA[In Amazing Coder's first screencast, we explore Twitter and what we can do with it with WordPress using a number of tools, but mainly the highly popular Twitter Tools. Created by Lewis King, the screen cast only skims the surface of what is possible and further possibilities will be taken into account in the next [...]]]></description>
			<content:encoded><![CDATA[<p>In Amazing Coder's first screencast, we explore Twitter and what we can do with it with WordPress using a number of tools, but mainly the highly popular Twitter Tools. Created by Lewis King, the screen cast only skims the surface of what is possible and further possibilities will be taken into account in the next couple of episodes. Read more to see the full video. <span id="more-238"></span></p>
<p><object width="576" height="324" data="http://vimeo.com/moogaloop.swf?clip_id=3228974&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=3228974&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /></object></p>
<p>NEW! View HD on the Vimeo site by clicking HD in the player! <a href="http://vimeo.com/3228974?pg=embed&amp;sec=&amp;hd=1">Or by clicking here! </a></p>
]]></content:encoded>
			<wfw:commentRss>http://amazingcoder.com/2009/02/23/screencast-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 ways to speed up your coding.</title>
		<link>http://amazingcoder.com/2009/02/20/5-ways-to-speed-up-your-coding/</link>
		<comments>http://amazingcoder.com/2009/02/20/5-ways-to-speed-up-your-coding/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 15:44:20 +0000</pubDate>
		<dc:creator>Lewis King</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[cod]]></category>
		<category><![CDATA[compress]]></category>
		<category><![CDATA[Compression]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[services]]></category>
		<category><![CDATA[shortcuts]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[Tables]]></category>
		<category><![CDATA[Tags]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[XAA]]></category>

		<guid isPermaLink="false">http://amazingcoder.com/?p=128</guid>
		<description><![CDATA[Everyone knows how frustrating it is when you visit an incredibly slow website. Watching the bar jump in tiny steps or the cog spin round endlessly is enough to make anyone go mad. Here are 5 ways to speed up your code, for a better end user experience. 
1. Compress your images.
When using the "Save [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone knows how frustrating it is when you visit an incredibly slow website. Watching the bar jump in tiny steps or the cog spin round endlessly is enough to make anyone go mad. Here are 5 ways to speed up your code, for a better end user experience. <span id="more-128"></span></p>
<h4>1. Compress your images.</h4>
<p>When using the "Save for Web" tool in Photoshop, you can compress our images in order to lower the file sizes. Now normally that's enough for anyone, but if you want the ultimate efficiency, a site named <a href="http://www.smush.it/">Smush.It</a> makes your images ultra tiny without taking any quality with it.</p>
<h4>2. Move script tags to the bottom</h4>
<pre class="">Content here...
&lt;script type="text/javascript" src="someScript.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="anotherScript.js"&gt;&lt;/script&gt;
&lt;/body&gt;
</pre>
<p>Moving the scripts down to the bottom of the page means that your form, content and images can all load before you start adding in the fancy effects or implementations. This is especially useful if for instance you're using a twitter badge to give your site you're twitter updates, but twitter is down. Having the code at the bottom of the page, means that all of your content can load first, rather than twitter timing out, then your content loading (making the page load very slow)</p>
<h4>3. Link your scripts from Google</h4>
<p>Not too long ago, <a href="http://code.google.com/apis/ajaxlibs/">Google began hosting </a>scripts such as jQuery. There is one main upside to this:</p>
<p>Caching: Let's imagine that one user visits 10 sites that all link to Google's CDN, the user would only download jQuery once. this is because a browser can tell if a file is modified or not and can choose to load it, or in this case, not have to.</p>
<h4>Compress your CSS and JS</h4>
<p>Compressing your CSS and JS files can make that tiny bit of difference and can speed your website up quite a bit. Here are some tools to get started.</p>
<p><strong>Javascript Compression Services</strong></p>
<ul>
<li><a href="http://javascriptcompressor.com/">Javascript Compressor</a></li>
<li><a href="http://www.xmlforasp.net/JSCompressor.aspx">JS Compressor</a></li>
</ul>
<p><strong> CSS Compression Services<br />
</strong></p>
<ul>
<li><a href="http://www.cssoptimiser.com/">CSS Optimiser</a></li>
<li><a href="http://www.cssdrive.com/index.php/main/csscompressor/">CSS Compressor</a></li>
<li><a href="http://www.cleancss.com/">Clean CSS</a></li>
</ul>
<h4>4. While creating, learn keyboard shortcuts</h4>
<p><img class="size-full wp-image-137 alignright" style="padding-left: 10px;" title="picture-7461" src="http://amazingcoder.com/wp-content/uploads/2009/02/picture-7461.png" alt="picture-7461" width="374" height="338" /></p>
<p>Now this may sound straightforward, but I know personally how frustrating it is to have to go three of four menus to get to a very simple function, only to realise when you've got there, there is a keyboard shortcut for it. Learn them. If a function doesn't have a keyboard shortcut, and you have a Mac, you can create you're own by going to Keyboard Shortcuts in System Preferences. Now I don't know if this is possible in Windows, but if it is, please do leave a comment so I can add it into the article, (I hate to leave out people because of their OS.) After creating a keyboard shortcut, make sure you actually use it. Time after time, I've created them and completely forget that I have. When you go to the menu item again, make sure you use the keyboard shortcut and think about it every time you do. Eventually it'll become second nature and you'll be flying through the menus with ease.</p>
<h4>5. Finally, don't use tables. </h4>
<p>Let me first explain what a table is for. A table is for laying out tabular data, not a while site. If you want a table of content, use tables. (pretty obvious) If you want a whole site layout, use CSS and Div tags. There are many reasons, but one relates to speed, Nested Tables load more slowly. The most common way to create fancy layouts with tables is to "nest" tables. This means that one (or more) table is placed inside another. The more tables that are nested, the longer it will take for the Web browser to render the Web page. In Internet Explorer, this results in images and text bouncing around on the screen until they figure out where to place them. And in Netscape 4, the page won't display at all.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazingcoder.com/2009/02/20/5-ways-to-speed-up-your-coding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>5 ways to improve your CSS</title>
		<link>http://amazingcoder.com/2009/02/18/5-ways-to-improve-your-css/</link>
		<comments>http://amazingcoder.com/2009/02/18/5-ways-to-improve-your-css/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 11:12:14 +0000</pubDate>
		<dc:creator>Lewis King</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Programs]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[5 ways]]></category>
		<category><![CDATA[ABC]]></category>
		<category><![CDATA[Alphabet]]></category>
		<category><![CDATA[Clean]]></category>
		<category><![CDATA[coda]]></category>
		<category><![CDATA[Comment]]></category>
		<category><![CDATA[copyright]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Improve]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[main]]></category>
		<category><![CDATA[program]]></category>
		<category><![CDATA[Reset]]></category>
		<category><![CDATA[Start right]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://amazingcoder.com/?p=193</guid>
		<description><![CDATA[I, among many have a love hate relationship with CSS. It's simple, powerful and easy to learn, but it's often incredibly frustrating, dare I mention IE6? Annoying as it is, it's the one that I really look forward to coding, so much so, that I'm almost always found in Coda testing things out I've thought of [...]]]></description>
			<content:encoded><![CDATA[<p>I, among many have a love hate relationship with CSS. It's simple, powerful and easy to learn, but it's often incredibly frustrating, dare I mention IE6? Annoying as it is, it's the one that I really look forward to coding, so much so, that I'm almost always found in Coda testing things out I've thought of or would like to try. All this playing around has taught me a lot about the language, so much so, that here are 5 ways to make your CSS better.<span id="more-193"></span></p>
<h4>1. Comment.</h4>
<p>CSS comments can be made for a single line or multiple lines, but regardless of how you pass your comments they are always passed to your users reading the file. So, not only does it make it easier for you to get to a certain section in your code, but it lets your users see it too. For instance, you could include a copyright notice, a contact number, a website. Anything! Comments help you out in more ways than one but the most important, it helps you find certain elements in the file. For instance, put a comment above all the link styles, then when you go through your work, you can find and edit the styles to your liking. Quickly. Another use? WordPress uses these comments to get the theme name, copyright and more. For the full syntax for WordPress, please see our <a href="http://amazingcoder.com/2009/02/16/coda-clips/">Coda Clips</a> post. </p>
<p>Here's how you comment CSS in the cleanest way.</p>
<pre class="">/* All CSS comments begin with forward slash and asterisk
and end with an asterisk and forward slash regardless if
the comment is many lines in length or if the comment is
only one line. */</pre>
<p>At the top of every page I code, I'm adding in the following syntax, not only does this give users information about where it originated and who by, it gives me a chance to say that they can't copy it, redistribute it or anything else of that nature and that they are free to have a look around and see how I've done things.</p>
<pre class="">/* All work copyright 2009, Lewis King. All rights reserved. This CSS file was originally created by Lewis, and  you cannot use it for your own work in full or parts. You're welcome to have a look around to see how things are done, but nothing can be taken without his express written consent. */</pre>
<p>Then, underneath that, I categorise everything in to the following sub headers.</p>
<pre class="">
/* Main */
/* Reset */
/* Link Styles */
/* Header */
/* Wrapper */
/* Content */
/* Footer */
/* Other */
</pre>
<h4>2. Reset.</h4>
<p>Use a reset of some sort. Whether you are using the Eric Meyer Reset, the YUI Reset, or your own custom reset, just use something. It can be as simple as removing the margin and padding from all elements:</p>
<pre class="">html, body, div, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, p, blockquote,
pre, form, fieldset, table, th, td { margin: 0; padding: 0; }</pre>
<p>Now I personally don't see the point in using a big reset like Eric and the YUI, personally, I only reset the padding and margin, like the example above. It's just the way I am, but, if you don't run any sort of reset, it could be a lot of time wasted, so give it a go.</p>
<h4>3. Start right.</h4>
<p>CSS is worthless without a well formatted document. You need to write your HTML before you write your CSS. If you write the CSS first, it'll be a lot harder to get the end results and will take a lot more time than it's actually worth. After remembering all the elements, how you've named them and what they do, trying to add them into a document that might not work the way you want, is going to take a good few hours. Write the whole HTML document first, then do the CSS. Not the other way round.</p>
<h4>4. ABC</h4>
<p>By alphabetizing your work, you are creating consistency that will help you reduce the time you spend searching for a specific element. By doing this, you can quickly get to the specific property you want to edit and work on it there and then. It also makes your code cleaner for you to read at a later date, along with your users who want to quickly see how you've done a certain thing. </p>
<h4>5. Use Coda Clips</h4>
<p>Back to my favourite coding application again, you must thing we're sponsored by it! Coda includes a little add-on of sorts called Coda Clips. What they do is genius. They are a great way of inserting common elements and syntax into a file with just a click of a button. Open up the Clips menu and you instantly see a bunch of different HTML elements, that you could forget when creating a site from scratch. After choosing the one you want, you simply click it, or drag it to where you want and it's instantly inserted into the page. They come with every install of Coda, even the free trial and are editable down to the finest detail. You can add your own, edit the defaults, and more. For some of our favourites, <a href="http://amazingcoder.com/2009/02/16/coda-clips/">please go here.</a></p>
<p><strong>What's your favourite way? How do you speed up your coding? How do you keep your code clean? Post a comment below to start the discussion!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://amazingcoder.com/2009/02/18/5-ways-to-improve-your-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
