<?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>Stiern &#187; Peter</title>
	<atom:link href="http://stiern.com/author/pshoeg/feed/" rel="self" type="application/rss+xml" />
	<link>http://stiern.com</link>
	<description>Web design, graphic design, Photoshop, CSS, etc</description>
	<lastBuildDate>Thu, 17 May 2012 09:38:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Usability in Terms of Use &amp; Privacy Policy Pages</title>
		<link>http://stiern.com/articles/usability/usability-in-user-terms-privacy-policies/</link>
		<comments>http://stiern.com/articles/usability/usability-in-user-terms-privacy-policies/#comments</comments>
		<pubDate>Tue, 15 May 2012 18:03:46 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://stiern.com/?p=1325</guid>
		<description><![CDATA[When I think of usability, my thoughts primarily revolve around the ease of use of a system — how it works, what works and what doesn&#8217;t. There&#8217;s a lot more to it than that. Recently on Twitter, Jeff Croft mentioned the Terms of Services page of the photo gallery site 500px. That made me think<a href="http://stiern.com/articles/usability/usability-in-user-terms-privacy-policies/" class="read-more">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>When I think of usability, my thoughts primarily revolve around the ease of use of a system — how it works, what works and what doesn&#8217;t. There&#8217;s a lot more to it than that.</p>
<p><span id="more-1325"></span></p>
<p>Recently on Twitter, <a title="Jeff Croft mentions the User Terms page of 500px" href="https://twitter.com/jcroft/statuses/201844914634498049">Jeff Croft mentioned</a> the <a title="Terms of Services on 500px" href="http://500px.com/terms">Terms of Services page</a> of the photo gallery site 500px. That made me think of content usability. You can do all sorts of things to help users get to your content; clever navigation, a good search function, few disturbing items around the content etc. While those definitely add to the overall usability of a website, let us not forget that most people visit our sites for the content.</p>
<div id="attachment_1334" class="wp-caption alignnone" style="width: 429px"><img class="size-full wp-image-1334" title="500px 'translates' their terms into everyday language" src="http://stiern.com/site/wp-content/everything/2012/05/500px_terms.png" alt="" width="419" height="130" /><p class="wp-caption-text">500px &#39;translates&#39; their terms into everyday language</p></div>
<p>The user terms page of 500px is focused on the user reading it. Every section is explained in everyday terms, making it very transparent what your rights are when uploading photos.</p>
<p>You&#8217;d be surprised at how many hard-to-read Terms of Use pages you can find — and how few easy-to-read. Other than 500px, I found that, among others, <a href="http://www.facebook.com/policies/?ref=pf">Facebook</a>, <a href="http://www.pandora.com/legal">Pandora</a> and <a title="Wikipedia's terms are introduced with a human-readable version" href="http://wikimediafoundation.org/wiki/Terms_of_Use_(2012)">Wikipedia</a> have taken a different and more user-friendly approach to Terms of Use and Privacy Policy pages.</p>
<p>We spend so much time on making our interfaces simpler — why not think about the content too?</p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/articles/usability/usability-in-user-terms-privacy-policies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dribbble Invite Giveaway</title>
		<link>http://stiern.com/competitions-and-giveaways/dribbble-invite-giveaway/</link>
		<comments>http://stiern.com/competitions-and-giveaways/dribbble-invite-giveaway/#comments</comments>
		<pubDate>Tue, 26 Jul 2011 22:32:00 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Competitions and Giveaways]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Dribbble]]></category>

		<guid isPermaLink="false">http://stiern.com/?p=1273</guid>
		<description><![CDATA[Some time ago, I was drafted to Dribbble. Other than being a great place for inspiration, Dribbble is a good opportunity to discuss my work with other designers — which has been both fun and educational. I would like every designer to experience this — unfortunately, I only have one invite. All you have to<a href="http://stiern.com/competitions-and-giveaways/dribbble-invite-giveaway/" class="read-more">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>Some time ago, I was drafted to <a title="Dribbble" href="http://dribbble.com/">Dribbble</a>. Other than being a great place for inspiration, Dribbble is a good opportunity to discuss my work with other designers — which has been both fun and educational. I would like every designer to experience this — unfortunately, I only have one invite.<span id="more-1273"></span></p>
<p>All you have to do is <a title="My Dribbble profile" href="http://dribbble.com/pshoeg">follow me on Dribbble</a> and post a comment below including the following:</p>
<ul>
<li>A link to your Dribbble prospect account</li>
<li>A link to your three best shots</li>
<li>A short explanation of why I should pick you</li>
</ul>
<p>I will decide who gets the invite in a week or so. I also tweeted about the invite, but got surprisingly few replies, so now I&#8217;m trying here.</p>
<h2>… and the winner is</h2>
<p>Thanks for the great submissions! The invite goes to <a title="Adomas' comment" href="http://stiern.com/competitions-and-giveaways/dribbble-invite-giveaway/comment-page-1/#comment-18186">Adomas</a>, who submitted three awesome shots that really stood out. Be sure to check out his <a title="Adomas' Behance portfolio" href="http://www.behance.net/adomas">Behance portfolio</a> as well — wicked good stuff! And now, also visit his <a title="Adomas&#039; Dribbble profile" href="http://dribbble.com/Jazdauskas" class="broken_link">Dribbble profile</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/competitions-and-giveaways/dribbble-invite-giveaway/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Usability in Icons</title>
		<link>http://stiern.com/articles/usability/usability-in-icons/</link>
		<comments>http://stiern.com/articles/usability/usability-in-icons/#comments</comments>
		<pubDate>Mon, 16 May 2011 17:35:05 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Usability]]></category>
		<category><![CDATA[Icons]]></category>

		<guid isPermaLink="false">http://stiern.com/?p=1197</guid>
		<description><![CDATA[In many apps, icons are used to illustrate a specific function — it can be used for everything from information to actions. But if the user doesn't understand the icon, what's the point?]]></description>
			<content:encoded><![CDATA[<p>In many apps, icons are used to illustrate a specific function — it can be used for everything from information to actions. But if the user doesn&#8217;t understand the icon, what&#8217;s the point?</p>
<p>When designing icons, you want to strive for creating/using isomorphic icons — that is, icons that represent their real-life companion — eg. trash can, brush, eraser, etc. As long as you can do a somewhat decent depiction, these icons will be usable. But what when there is no real-life companion?</p>
<p>As an example, I&#8217;m going to use the icon for a link. &#8220;A link?&#8221; you say. &#8220;Everyone knows what the icon for a link looks like!&#8221; What is the first icon that comes to mind when thinking of inserting a link in an e-mail, a blog post, or in your CMS? A chain? A globe? A …? Yeah, there are a couple of different icons for inserting links, and you might think they&#8217;re all logical. But they&#8217;re not necessarily.</p>
<h2>How do the big guys do it?</h2>
<div id="attachment_1205" class="wp-caption alignnone" style="width: 568px"><img class="size-full wp-image-1205 " title="Icons for Links in Apps and Websites" src="http://stiern.com/site/wp-content/everything/2011/05/icons.png" alt="" width="558" height="31" /><p class="wp-caption-text">Examples of link icons in apps and websites</p></div>
<p>As you can see, most CMSes and apps use a chain. The only one really separating from the rest is Facebook, using a note — and I think that makes even less sense than a chain.</p>
<h2>Only  geeks understand link icons</h2>
<p>I&#8217;m a geek myself, so I can say it — only geeks understand link icons. In 2010, I wrote my bachelor project with <a title="Morten Keilow's Twitter profile" href="http://www.twitter.com/mKeilow">Morten Keilow</a>. The project aimed at exploring how little documentation you could leave in a CMS, and still have even the most non-savvy person use it with no issues. When we created the interface design, we used a chain icon without even giving it any thought.</p>
<p>We gave the test participants a list of assignments to perform, one of which was inserting a link. What really surprised us was, that almost no one could figure out how to insert a link. We decided on testing the link icon out of context together with other icons regularly used in CMSes and text editors, and the results were really surprising.</p>
<div id="attachment_1212" class="wp-caption alignnone" style="width: 610px"><img class="size-full wp-image-1212 " title="The icons used in our test" src="http://stiern.com/site/wp-content/everything/2011/05/icons2.png" alt="" width="600" height="127" /><p class="wp-caption-text">The icons used in our test</p></div>
<p>Several of our test participants understood the chain icon as &#8220;binding something together&#8221; or &#8220;linking to elements together&#8221;, which is not altogether wrong — the issue is that they do not understand <em>what</em> they are binding together — and thus, the icon doesn&#8217;t work as intended. The globe icon brought comments like &#8220;You can visit the Internet&#8221;, &#8220;Search&#8221;, or &#8220;Upload to the Internet&#8221;.</p>
<table cellspacing="10" cellpadding="0">
<thead>
<tr>
<td>Icon</td>
<td>Did understand</td>
<td>Did not understand</td>
</tr>
</thead>
<tbody>
<tr>
<td>Bold</td>
<td>100 %</td>
<td>0 %</td>
</tr>
<tr>
<td>Italic</td>
<td>100 %</td>
<td>0 %</td>
</tr>
<tr>
<td>Underlined</td>
<td>100 %</td>
<td>0 %</td>
</tr>
<tr>
<td>Strike-through</td>
<td>54.55 %</td>
<td>45.45 %</td>
</tr>
<tr>
<td>Link 1 (chain)</td>
<td>35.29 %</td>
<td>64.71 %</td>
</tr>
<tr>
<td>Link 2 (globe)</td>
<td>25 %</td>
<td>75 %</td>
</tr>
<tr>
<td>Ordered list</td>
<td>100 %</td>
<td>0 %</td>
</tr>
<tr>
<td>Unordered list</td>
<td>93.94 %</td>
<td>6.06 %</td>
</tr>
<tr>
<td>Image</td>
<td>78.79 %</td>
<td>21.21 %</td>
</tr>
<tr>
<td>Undo</td>
<td>57.58 %</td>
<td>42.42 %</td>
</tr>
<tr>
<td>Redo</td>
<td>51.52 %</td>
<td>48.48 %</td>
</tr>
</tbody>
</table>
<p>All in all, only 35.29 % of the test participants understood the chain icon, and only 25 % understood the globe icon. While we didn&#8217;t set a minimum for success, clearly, 25 % is not good when it comes to usability. When being interviewed one of our participants asked:</p>
<blockquote><p>&#8220;Why not just write WWW? Everyone understands that!&#8221;</p></blockquote>
<p>It is possible that someone would understand WWW as &#8220;visit the internet&#8221; or similar, but we found that every single test participant understood this icon. This probably isn&#8217;t the best solution — however for now, at least based on our tests, it is the most usable icon for explaining a link.</p>
<p>I would love to do another test of any other icons that might be better, so if you have any ideas, please write in the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/articles/usability/usability-in-icons/feed/</wfw:commentRss>
		<slash:comments>95</slash:comments>
		</item>
		<item>
		<title>8 Advice about Usability Testing</title>
		<link>http://stiern.com/articles/usability/8-advice-about-usability-testing/</link>
		<comments>http://stiern.com/articles/usability/8-advice-about-usability-testing/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 21:44:27 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Usability]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://stiern.com/articles/usability/tips-about-usability-testing</guid>
		<description><![CDATA[When studying for my Bachelor's degree in Medialogy, usability testing was an important step in each iteration of our projects. In this article, I'm going to introduce you to some of the things I learned doing usability testing. This will not teach you about how to perform an actual usability test, but rather help you to create the best circumstances for your test.]]></description>
			<content:encoded><![CDATA[<p>When studying for my Bachelor&#8217;s degree in Medialogy, usability testing was an important step in each iteration of our projects. In this article, I&#8217;m going to introduce you to some of the things I learned doing usability testing. This will not teach you about how to <em>perform</em> an actual usability test, but rather help you to create the best circumstances for your test.</p>
<p><span id="more-1126"></span></p>
<h3>Test your test</h3>
<p>Before conducting the test, be sure to test it on a couple of persons. Nothing is worse than noticing an error when you&#8217;ve already run through the first test subjects. Instead of focusing on the test results, ask about your skills as test conductor, if they felt uncomfortable, if your questions were understandable, etc. They will most likely find the most crucial errors, and it&#8217;ll be a huge help in the real test.</p>
<h3>Environment</h3>
<p>The environment surrounding a usability is crucial for receiving usable results. You want your subjects to feel comfortable, and to focus on nothing else than your product — you want them to feel home. Make sure to find a place with no noise, get a good chair, air out, throw out the trash — create a place you would want to work.</p>
<h3>Declaration of consent</h3>
<p>A declaration of consent makes sure that you&#8217;re actually allowed to use the test results, recorder sound or video, or whatever you write in there. Just like a photographer, you need to collect signatures from your subjects — and remember to do so <em>before</em> running the test.</p>
<h3>Ask more questions than you need answered</h3>
<p>One of the usability tests we did on campus went terribly wrong. When we were analyzing the results, we found out that we needed to ask some more questions in order to be able to use the results, and we had to do a lot of it all over again. Be sure to ask for age, occupation, etc. — usability testing relies a lot on demographics. Also, be sure to ask the questions in the same tone for every test subject. Your test participants can be swayed just by changing the tone of voice, and you want your test to be credible.</p>
<h3>Rehearse and have everything in place</h3>
<p>Show that you&#8217;re serious about what you&#8217;re doing – that you believe in your product. When your test subject arrives, it&#8217;s your job to guide them. Take the lead, show them where to sit, but don&#8217;t be bossy.</p>
<h3>Have extra of everything</h3>
<p>You always want to keep extra paper, pens, declaration of consents, batteries, question sheets, etc. It may seem like an obvious advice, but I tried running out of question sheets once, and we had to go print in the middle of the test.</p>
<h3>Computer</h3>
<p>Unless specified in your target group, you can&#8217;t be sure that your test participants use the same operating system as you. The best would be to let the test participant use their own computer, but if that&#8217;s not the case, at least have both a Mac and a PC to ensure that the OS will not confuse them so much they&#8217;ll have a hard time actually taking part in the test. Also, be sure to have a decent mouse.</p>
<h3>Payment</h3>
<p>Students have little or no cash to give for testing, so we often just made a cake and gave the subjects a piece after the test. However, if you work in a company, many people might find it strange that they should volunteer to help you make money. Try to convince your boss to put some money in usability testing — people tend to be more willing to help if they&#8217;re paid. Be sure not to buy nice words, stress that you want their whole-hearted opinion.</p>
<p>These are some of the things I have learned in usability testing. I hope you can use the advice — feel free to share your own in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/articles/usability/8-advice-about-usability-testing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Book Review: Introducing HTML5</title>
		<link>http://stiern.com/review/book-review-introducing-html5/</link>
		<comments>http://stiern.com/review/book-review-introducing-html5/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 07:26:28 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Review]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://stiern.com/?p=1082</guid>
		<description><![CDATA[Everyone&#8217;s talking about HTML5 right now. And still, it seems that no one really understands what it is. You could sit down with the spec. Or you could read Remy Sharp and Bruce Lawson&#8217;s Introducing HTML5. Published in July 2010, it&#8217;s a fairly new book, divided into 10 easy-to-read chapters written by one of the<a href="http://stiern.com/review/book-review-introducing-html5/" class="read-more">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>Everyone&#8217;s talking about HTML5 right now. And still, it seems that no one really understands what it is. You could sit down with the spec. Or you could read Remy Sharp and Bruce Lawson&#8217;s Introducing HTML5.</p>
<p><span id="more-1082"></span>Published in July 2010, it&#8217;s a fairly new book, divided into 10 easy-to-read chapters written by one of the two authors. The book is kept in a light language, but still is advanced enough to learn something even if you are already familiar with most of HTML5&#8242;s features.</p>
<p>The book covers most new features of HTML5, including canvas, multimedia, forms, and storage. Each chapter features great code examples to help you understand the features even better.</p>
<p>The first two chapters of the book are written by Bruce Lawson, and they provide a great overview of the new elements of HTML5 (header, section, article, etc.)—and an excellent explanation (with examples) of the semantic values of these. Before reading this chapter, I found it hard to interpret the very formal phrasing in the spec, but Lawson explains (and discusses) the semantic values of the new elements, making the book perfect for using as a reference.</p>
<p>Chapter 3 gives a great introduction to the use of form elements in HTML5—including information on fallback methods for older browsers, and how to override the default browser settings.</p>
<p>The video element of HTML5 is one of the most discussed right now. In chapter 4, Lawson and Sharp explains how to use both that, and the audio element. You&#8217;ll also get some great information on codecs, and they&#8217;ll even teach you how to make custom controls for your video player.</p>
<blockquote><p>If the video element is the poster boy of HTML5, the canvas element is deﬁnitely the Han Solo of HTML5.</p></blockquote>
<p><cite>— Sharp, page 115</cite></p>
<p>Another very discussed part of HTML5 is the canvas element, which provides a 2D drawing API to use in HTML5. Remy Sharp gives examples of how you can use canvas—from drawing lines to animating. However, Sharp also explains that canvas is not necessarily the best part for the job, just because it&#8217;s a part of HTML5—be sure to read the infobox about when to use canvas and when to use SVG.</p>
<p>The latter five chapters of the book more or less describe the web application part of HTML5; data storage, offline detection, drag and drop, geolocation, messages, workers, and sockets. These chapters are also the more advanced part of the book. The first chapters will, if you know HTML on advance, basically just give you some new tools to play with. But these guys—they&#8217;re the reason HTML5 is awesome.</p>
<p>You&#8217;ll learn how to avoid using cookies, and instead using HTML5&#8242;s storage options—both session storage and local storage are incredibly handy tools. As Sharp puts it; <em>&#8220;In a nutshell, the Web Storage API is cookies on steroids.&#8221;</em> You&#8217;ll learn how to take advantage of these, and when to use which.</p>
<p>If you&#8217;re creating a web application, offline detection also can become quite useful. How awesome is it, that you can let your users use your web app when they&#8217;re offline? Sharp leads you through the process of making your web app available even when there&#8217;s no internet connection—including all the quirks you need to pay attention to.</p>
<p>One of the cool things about the book is, that Sharp and Lawson dare to criticize the spec—and that is especially expressed in chapter 8: drag and drop. First, you&#8217;ll get a little history of the API, and why it&#8217;s even a part of HTML5. And even though they don&#8217;t like it, they&#8217;ll teach you how to use it. The problem with the drag and drop API is, that it&#8217;s very hard to implement across browsers, and thus, you&#8217;ll often have to fall back to JavaScript.</p>
<p>Chapter 9 is about geolocation, something I guess we&#8217;ll see a lot more as mobile devices becomes more advanced. With Gowalla, FourSquare, and Facebook Places, it is obvious that people like to tell about their whereabouts. However, it&#8217;s not only a stalker tool, you can really give your visitors a great experience using geolocation—showing nearby places to by your product, etc. The cool thing about it is, that you really don&#8217;t need that much code to use it. This chapter explains both how it works and how to use it—in the same light language as the rest of the book is written in.</p>
<p>Even though only the Message API is a part of the spec, Sharp has chosen to include both Message, Sockets, and Workers in the final chapter. Once again, through simple examples you&#8217;ll learn how to take advantage of these advanced tools. If you&#8217;re serious about creating web applications, you need to look into this chapter.</p>
<h3>Conclusion</h3>
<p>The great thing about this book—which I by all means will recommend—is, that it not only tells you <em>how</em> to use HTML5, it also tells you <em>why</em>. <em>Why </em>should you use the new input types, <em>why </em>should you use the video element, etc.? On top of that, they relate every part of HTML5 to accessibility—something I would love to pay more attention to in the future.</p>
<p>In a humorous tone, Lawson and Sharp provides what is definitely going to be my HTML5 reference.</p>
<p>Be sure to check out the <a title="Introducing HTML5" href="http://introducinghtml5.com/">book website</a>, where you&#8217;ll find examples and source code to the book chapters.</p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/review/book-review-introducing-html5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS3 is Not Freaking HTML5</title>
		<link>http://stiern.com/articles/css3-is-not-freaking-html5/</link>
		<comments>http://stiern.com/articles/css3-is-not-freaking-html5/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 09:42:03 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[Prototype]]></category>

		<guid isPermaLink="false">http://stiern.com/?p=1032</guid>
		<description><![CDATA[So, there&#8217;s been quite a buzz about HTML5 lately. New semantic elements, native audio and video tags, the canvas element, etc. It&#8217;s all good. However, some people seem to have a hard time distinguishing between HTML5 and CSS3. And between HTML5 and jQuery. Not Flash. They know that HTML5 is not Flash. In this article<a href="http://stiern.com/articles/css3-is-not-freaking-html5/" class="read-more">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>So, there&#8217;s been quite a buzz about HTML5 lately. New semantic elements, native audio and video tags, the canvas element, etc. It&#8217;s all good. However, some people seem to have a hard time distinguishing between HTML5 and CSS3. And between HTML5 and jQuery. Not Flash. They know that HTML5 is not Flash.</p>
<p><span id="more-1032"></span></p>
<p>In this article I&#8217;m going to give you a very<em> </em>short overview of the three technologies, to help you know the difference.</p>
<h3>CSS3</h3>
<p>CSS—or <em>cascading stylesheets</em>—is a specification under development. Many features are already supported by modern browsers such as Safari, Firefox, and Chrome (and soon to come: IE9). Let&#8217;s have a glance at the W3C&#8217;s (those guys who work on developing standards) description of <a title="HTML &amp; CSS - W3C" href="http://www.w3.org/standards/webdesign/htmlcss">what CSS is</a>:</p>
<blockquote><p>&#8220;CSS is the language for describing the presentation of Web pages, including colors, layout, and fonts.&#8221;</p></blockquote>
<p>Okay, so it&#8217;s got something to do with layout. What can you do with CSS? Well, you can <em>style</em> HTML elements. You can animate them. It&#8217;s awesome. But it&#8217;s not HTML5! I feel tempted to, once again, quote W3C:</p>
<blockquote><p>&#8220;The separation of HTML from CSS makes it easier to maintain sites, share style sheets across pages, and tailor pages to different environments. This is referred to as the <em>separation of structure (or: content) from presentation.&#8221;</em></p></blockquote>
<p>For me, that settles it. In case it doesn&#8217;t for you, <em>separation</em> is the keyword here. We&#8217;re <em>separating</em> structure (HTML) from presentation (CSS). Structure. And presentation. Not the same. But equally important.</p>
<p>Even though CSS3 is not HTML5, it doesn&#8217;t mean that it isn&#8217;t cool. You can do all sorts of amazing stuff with CSS3. So many people have created lists of stunning CSS3 effects, and I&#8217;m not going to attempt to do it over again, &#8217;cause they&#8217;re all really good.</p>
<p>To learn more about CSS3 and what it does, check out <a title="CSS3.info" href="http://www.css3.info/">CSS3.info</a>.</p>
<h3>JavaScript Frameworks</h3>
<p>JavaScript frameworks/libraries/whatever are might popular these days. With relatively few lines of code it&#8217;s possible to do Ajax interactions, animations, and a bunch of other stuff. Popular frameworks include <a title="jQuery" href="http://jquery.com">jQuery</a>, <a title="Prototype" href="http://www.prototypejs.org/">Prototype</a>, and <a title="MooTools" href="http://mootools.net/">MooTools</a>—and they all share the same thing: it&#8217;s <em>JavaScript</em>. And JavaScript is not HTML5.</p>
<p>You can use JavaScript to enable HTML5 elements in older browsers (check out <a title="Modernizt" href="http://modernizr.com/">Modernizr</a>), or you can use it to develop incredible web applications. JavaScript is amazing. Being able to do modifications on a website without reloading it is great. But it isn&#8217;t HTML5.</p>
<h3>HTML5</h3>
<blockquote><p>&#8220;HTML is the language for describing the structure of Web pages.&#8221;</p></blockquote>
<p>Yeah, I&#8217;m quoting W3C again. HTML5 is an emerging standard to take over HTML 4 and XHTML 1.1. With focus on structural elements and web application features, HTML5 really is going to be the next big thing. Recently, Apple launched their <a title="Apple's HTML5 showcase" href="http://www.apple.com/html5/">“HTML5” showcase</a>. What&#8217;s funny is, that most examples are actually showcasing CSS3 and JavaScript. And as you all might remember—neither CSS3 nor JavaScript is HTML5.</p>
<p>It seems that HTML5 is becoming the generic term for &#8220;cool stuff you can do on the Internet&#8221;. I feel sorry for HTML5. It deserves to be recognized for what it is, and what it&#8217;s good at. As do CSS3. As do JavaScript. This confusion of concept isn&#8217;t doing good for anyone. Few years from now I fear my clients saying: &#8220;The design is a little bit boring. Maybe if you add some HTML5 effects…&#8221;.</p>
<p>So please, help spread the word: CSS3 is not HTML5. Neither is JavaScript.</p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/articles/css3-is-not-freaking-html5/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Stunning Wedding Invitation Inspiration and Resources</title>
		<link>http://stiern.com/inspiration/stunning-wedding-invitation-inspiration/</link>
		<comments>http://stiern.com/inspiration/stunning-wedding-invitation-inspiration/#comments</comments>
		<pubDate>Fri, 14 May 2010 09:06:11 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[Graphic Design]]></category>
		<category><![CDATA[invitation]]></category>
		<category><![CDATA[wedding]]></category>

		<guid isPermaLink="false">http://stiern.com/?p=976</guid>
		<description><![CDATA[When the big day comes closer, you need to send out invitations. Sure, you might buy some cards and put your names on them. But if you're a designer, why not design them yourself? This post holds examples of some amazing wedding invitation cards, that you can use for your inspiration. You will also find fonts, brushes, patterns, etc., that you can use in your designs.]]></description>
			<content:encoded><![CDATA[<p>When the big day comes closer, you need to send out invitations. Sure, you might buy some cards and put your names on them. But if you&#8217;re a designer, why not design them yourself? This post holds examples of some amazing wedding invitation cards, that you can use for your inspiration. You will also find fonts, brushes, patterns, etc., that you can use in your designs.</p>
<p><span id="more-976"></span></p>
<h3>Inspiration</h3>
<p><a class="postimg" title="Wedding Invitation, C&amp;M" href="http://vanityclaire.deviantart.com/art/Wedding-Invitation-02-113995066"><img class="alignnone size-full wp-image-979" title="Wedding Invitation, C&amp;M" src="http://stiern.com/site/wp-content/everything/27d01d290a5509e6b4dc4192edf230c8.jpg" alt="" width="540" height="540" /></a></p>
<p><a class="postimg" href="http://www.flickr.com/photos/aprilink/3220620218/"><img class="alignnone size-full wp-image-981" title="Melanie &amp; Phillip" src="http://stiern.com/site/wp-content/everything/3220620218_9095f7e24c_b.jpg" alt="" width="540" height="405" /></a></p>
<p><a class="postimg" href="http://www.flickr.com/photos/thingsarebetterwithaparrott/3911913739/"><img class="alignnone size-full wp-image-983" title="Set Sail" src="http://stiern.com/site/wp-content/everything/3911913739_dd87333d8e_b.jpg" alt="" width="540" height="360" /></a></p>
<p><a class="postimg" href="http://vanityclaire.deviantart.com/art/Wedding-Invitation-04-113995492"><img class="alignnone size-full wp-image-985" title="Julia &amp; Mark" src="http://stiern.com/site/wp-content/everything/ce9985583be6a35edd4b4d31fdc65107.jpg" alt="" width="540" height="540" /></a></p>
<p><a class="postimg" href="http://www.flickr.com/photos/barbaraferreira/3593906470/"><img class="alignnone size-full wp-image-986" title="Juliana &amp; Miguel" src="http://stiern.com/site/wp-content/everything/3593906470_35659e9101_b.jpg" alt="" width="540" height="405" /></a></p>
<p><a class="postimg" href="http://www.flickr.com/photos/28091627@N04/3116861578/"><img class="alignnone size-full wp-image-988" title="Palais letterpress" src="http://stiern.com/site/wp-content/everything/3116861578_7732a9bdc3_o.jpg" alt="" width="540" height="450" /></a></p>
<p><a href="http://www.flickr.com/photos/tugboatprintshop/2365502178/sizes/o/"><img class="alignnone size-full wp-image-989" title="Dan &amp; Andy" src="http://stiern.com/site/wp-content/everything/2365502178_cf9a00227a_o.jpg" alt="" width="540" height="405" /></a></p>
<p><img class="alignnone size-full wp-image-992" title="Abby &amp; Justin" src="http://stiern.com/site/wp-content/everything/3730106299_3d47231fdc_o.jpg" alt="" width="540" height="748" /></p>
<p><a class="postimg" href="http://peterbowen.deviantart.com/art/Wedding-Invitation-149901696"><img class="alignnone size-full wp-image-994" title="Samantha &amp; Adam" src="http://stiern.com/site/wp-content/everything/04111f27e10db3de3a4e4ca56270ac43.jpg" alt="" width="423" height="600" /></a></p>
<p><a class="postimg" href="http://rcryn.deviantart.com/art/Wedding-Invitation-2-132106764"><img class="alignnone size-full wp-image-995" title="Randy &amp; Jacqueline" src="http://stiern.com/site/wp-content/everything/Wedding_Invitation_2_by_rcryn.jpg" alt="" width="540" height="382" /></a></p>
<p><a class="postimg" href="http://www.flickr.com/photos/dcwrittenword/4017849458/"><img class="alignnone size-full wp-image-996" title="Laura &amp; Scott" src="http://stiern.com/site/wp-content/everything/4017849458_328c9c7ebd_b.jpg" alt="" width="540" height="405" /></a></p>
<p><a class="postimg" href="http://www.flickr.com/photos/36707143@N05/3384867356/"><img class="alignnone size-full wp-image-997" title="Julie &amp; David" src="http://stiern.com/site/wp-content/everything/3384867356_97eddd55bf_o.jpg" alt="" width="530" height="530" /></a></p>
<p><a class="postimg" href="http://www.flickr.com/photos/27511405@N00/4504959494/"><img class="alignnone size-full wp-image-998" title="Sarah &amp; John" src="http://stiern.com/site/wp-content/everything/4504959494_a7d621550f_o.jpg" alt="" width="514" height="386" /></a></p>
<p><a class="postimg" href="http://www.flickr.com/photos/papercutindustries/4405297702/"><img class="alignnone size-full wp-image-999" title="Simone &amp; James" src="http://stiern.com/site/wp-content/everything/4405297702_c1f38e38df_b.jpg" alt="" width="540" height="436" /></a></p>
<h3>Fonts</h3>
<p>As you can see in many of the designs above, calligraphic fonts are often used in wedding invitations. Be careful when choosing your font—your want your guest to be able to read the text. There&#8217;s no reason not to mix font. For instance, you can use a calligraphic font for your names and a serif font for the rest of the text. The possibilities are endless. Here are some free fonts you can use in your wedding invitation designs.</p>
<p><a class="postimg postimg2" href="http://www.fontsquirrel.com/fonts/Ballpark"><img class="alignnone size-full wp-image-1002" title="Ballpark" src="http://stiern.com/site/wp-content/everything/ballpark.png" alt="" width="540" height="70" /></a></p>
<p><a class="postimg postimg2" href="http://www.fontsquirrel.com/fonts/Windsong"><img class="alignnone size-full wp-image-1004" title="Windsong" src="http://stiern.com/site/wp-content/everything/windsong.png" alt="" width="540" height="100" /></a></p>
<p><a class="postimg postimg2" href="http://www.fontsquirrel.com/fonts/Calluna"><img class="alignnone size-full wp-image-1006" title="Calluna" src="http://stiern.com/site/wp-content/everything/calluna.png" alt="" width="540" height="70" /></a></p>
<p><a class="postimg postimg2" href="http://www.fontsquirrel.com/fonts/Goudy-Bookletter-1911"><img class="alignnone size-full wp-image-1007" title="Goudy Bookletter 1911" src="http://stiern.com/site/wp-content/everything/goudy.png" alt="" width="540" height="70" /></a></p>
<p><a class="postimg postimg2" href="http://www.dafont.com/philosopher.font"><img class="alignnone size-full wp-image-1008" title="Philosopher" src="http://stiern.com/site/wp-content/everything/philosopher.png" alt="" width="540" height="70" /></a></p>
<p><a class="postimg postimg2" href="http://www.dafont.com/freebooter-script.font"><img class="alignnone size-full wp-image-1017" title="Freebooter Script" src="http://stiern.com/site/wp-content/everything/freebooter.png" alt="" width="540" height="100" /></a></p>
<p>Also, be sure to check out the ampersand in Baskerville Italic (which you probably have on your computer).</p>
<h3>Brushes and Patterns</h3>
<p>Ornaments and florals are often seen in wedding invitations. Here are some Photoshop brushes and patterns to use in your designs.</p>
<p><a class="postimg" href="http://www.brusheezy.com/brushes/2293-Calligraphic-Ornaments"><img class="alignnone size-full wp-image-1009" title="Calligraphic Ornaments" src="http://stiern.com/site/wp-content/everything/calligraphic_ornaments-1.jpg" alt="" width="540" height="252" /></a></p>
<p><a class="postimg" href="http://www.brusheezy.com/brushes/1449-Swirls-and-Flourishes"><img class="alignnone size-full wp-image-1010" title="Swirls and Flourishes" src="http://stiern.com/site/wp-content/everything/Swirls___Flourishes_II_Brus.jpg" alt="" width="300" height="220" /></a></p>
<p><a href="http://www.brusheezy.com/patterns/2211-Baroque-collection-lite"><img class="alignnone size-full wp-image-1011" title="Baroque Seamless Patterns" src="http://stiern.com/site/wp-content/everything/cover.jpg" alt="" width="540" height="412" /></a></p>
<p><a class="postimg" href="http://www.brusheezy.com/brushes/1758-Funky-Paisley-Brushes"><img class="alignnone size-full wp-image-1012" title="Funky Paisley Brushes" src="http://stiern.com/site/wp-content/everything/Funky_Paisley_Brushes_by_debh945.jpg" alt="" width="300" height="220" /></a></p>
<p><a href="http://www.brusheezy.com/patterns/1710-Wallpaper-patterns"><img class="alignnone size-full wp-image-1013" title="Wallpaper Patterns" src="http://stiern.com/site/wp-content/everything/preview.png" alt="" width="540" height="517" /></a></p>
<p><img class="alignnone size-full wp-image-1014" title="Book Ornaments Brushes" src="http://stiern.com/site/wp-content/everything/Book_Ornaments_Brushes_3_by_Leichnam.jpg" alt="" width="400" height="400" /></p>
<p><a class="postimg" href="http://pruttmaskin.deviantart.com/art/A-Scroll-Banner-Brush-68650079"><img class="alignnone size-full wp-image-1015" title="A Scroll Banner" src="http://stiern.com/site/wp-content/everything/A_Scroll_Banner_Brush_by_pruttmaskin.jpg" alt="" width="500" height="500" /></a></p>
<p>I hope you enjoyed the post, and found some great inspiration and resources for your wedding invitation project. Be sure to post a link to your wedding invitation in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/inspiration/stunning-wedding-invitation-inspiration/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Create a Cool Messy List with CSS3 and nth-child</title>
		<link>http://stiern.com/tutorials/create-a-cool-messy-list-with-css3-and-nth-child/</link>
		<comments>http://stiern.com/tutorials/create-a-cool-messy-list-with-css3-and-nth-child/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 07:00:34 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[nth-child]]></category>

		<guid isPermaLink="false">http://stiern.com/?p=920</guid>
		<description><![CDATA[While working on a design recently, I stumbled upon Chris Coyier&#8217;s article How nth-child Works. Chris shows us the basics of the nth-child pseudo-selector in CSS. It can be used for so many things, but in this short tutorial I&#8217;m going to show you how to create a cool messy list. First, check out the<a href="http://stiern.com/tutorials/create-a-cool-messy-list-with-css3-and-nth-child/" class="read-more">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>While working on a design recently, I stumbled upon Chris Coyier&#8217;s article <em><a title="How nth-child Works | CSS-Tricks" href="http://css-tricks.com/how-nth-child-works/">How nth-child Works</a></em>. Chris shows us the basics of the nth-child pseudo-selector in CSS. It can be used for so many things, but in this short tutorial I&#8217;m going to show you how to create a cool messy list.<br />
<span id="more-920"></span><br />
First, check out the demo to see what we&#8217;re creating in <a href="http://dl.dropbox.com/u/32709/stiern/messylist/index.html" title="Demo">the demo</a>.</p>
<p>We&#8217;re going to start with an HTML5 document (why not?), and include a stylesheet, as shown below:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Messy List<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #00bbdd;">&lt;!DOCTYPE HTML&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;utf-8&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Messy List<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;style.css&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;header&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Messy List<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>header&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;section&gt;</span>
&nbsp;
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>Lorem ipsum dolor sit amet<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>Duis aute irure dolor in reprehenderit.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>Excepteur sint occaecat cupidatat.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>Ut enim ad minim veniam.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>section&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;footer&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Copyright <span style="color: #ddbb00;">&amp;copy;</span> 2010<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>footer&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>That&#8217;s a pretty simple HTML document—and of course the most important part is the list. Next, here&#8217;s the stylesheet (with an HTML5 CSS reset in it as well). You can get the background from <a href="http://seamlesstextures.net/" title="SeamlessTextures">SeamlessTextures</a>. I&#8217;ve modified it in color and size, so you can also just get <a href="http://dl.dropbox.com/u/32709/stiern/messylist/background.png" title="Modified background">my version</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* HTML 5 Reset */</span>
html<span style="color: #00AA00;">,</span> body<span style="color: #00AA00;">,</span> div<span style="color: #00AA00;">,</span> span<span style="color: #00AA00;">,</span> object<span style="color: #00AA00;">,</span> iframe<span style="color: #00AA00;">,</span> h1<span style="color: #00AA00;">,</span> h2<span style="color: #00AA00;">,</span> h3<span style="color: #00AA00;">,</span> h4<span style="color: #00AA00;">,</span> h5<span style="color: #00AA00;">,</span> h6<span style="color: #00AA00;">,</span> p<span style="color: #00AA00;">,</span> blockquote<span style="color: #00AA00;">,</span> pre<span style="color: #00AA00;">,</span> a<span style="color: #00AA00;">,</span> abbr<span style="color: #00AA00;">,</span> address<span style="color: #00AA00;">,</span> cite<span style="color: #00AA00;">,</span> code<span style="color: #00AA00;">,</span> del<span style="color: #00AA00;">,</span> dfn<span style="color: #00AA00;">,</span> em<span style="color: #00AA00;">,</span> img<span style="color: #00AA00;">,</span> ins<span style="color: #00AA00;">,</span> kbd<span style="color: #00AA00;">,</span> q<span style="color: #00AA00;">,</span> samp<span style="color: #00AA00;">,</span> small<span style="color: #00AA00;">,</span>  strong<span style="color: #00AA00;">,</span> sub<span style="color: #00AA00;">,</span> sup<span style="color: #00AA00;">,</span> var<span style="color: #00AA00;">,</span> b<span style="color: #00AA00;">,</span> i<span style="color: #00AA00;">,</span> dl<span style="color: #00AA00;">,</span> dt<span style="color: #00AA00;">,</span> dd<span style="color: #00AA00;">,</span> ol<span style="color: #00AA00;">,</span> ul<span style="color: #00AA00;">,</span> li<span style="color: #00AA00;">,</span> fieldset<span style="color: #00AA00;">,</span> form<span style="color: #00AA00;">,</span> label<span style="color: #00AA00;">,</span> legend<span style="color: #00AA00;">,</span> table<span style="color: #00AA00;">,</span> caption<span style="color: #00AA00;">,</span> tbody<span style="color: #00AA00;">,</span> tfoot<span style="color: #00AA00;">,</span> thead<span style="color: #00AA00;">,</span> tr<span style="color: #00AA00;">,</span> th<span style="color: #00AA00;">,</span> td <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">vertical-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">baseline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
body <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
table <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">border-collapse</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">collapse</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-spacing</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
section<span style="color: #00AA00;">,</span> article<span style="color: #00AA00;">,</span> aside<span style="color: #00AA00;">,</span> header<span style="color: #00AA00;">,</span> footer<span style="color: #00AA00;">,</span> nav<span style="color: #00AA00;">,</span> dialog<span style="color: #00AA00;">,</span> figure <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
body <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">background.png</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">600px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">40px</span> <span style="color: #993333;">auto</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Georgia<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#333333</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
h1 <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3em</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">1em</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul li <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">8px</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span>odd<span style="color: #00AA00;">&#41;</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span>odd<span style="color: #00AA00;">&#41;</span><span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.3</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>	
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span>even<span style="color: #00AA00;">&#41;</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.3</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span>even<span style="color: #00AA00;">&#41;</span><span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.5</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span>3n<span style="color: #00AA00;">+</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span> <span style="color: #00AA00;">&#123;</span>
	-webkit-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>-0.6deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	-moz-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>-0.6deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>-0.6deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span>3n<span style="color: #00AA00;">+</span><span style="color: #cc66cc;">2</span><span style="color: #00AA00;">&#41;</span> <span style="color: #00AA00;">&#123;</span>
	-webkit-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>0.5deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	-moz-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>0.5deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>0.5deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span>3n<span style="color: #00AA00;">+</span><span style="color: #cc66cc;">3</span><span style="color: #00AA00;">&#41;</span> <span style="color: #00AA00;">&#123;</span>
	-webkit-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>0.2deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	-moz-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>0.2deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>0.2deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>I guess there&#8217;s not much new for you here, but let&#8217;s break it down a bit anyway. First, we define the width of our body to be 600px. Also, we include the aforementioned background, specify font and color, and add a top margin. Next, we define the size of our H1. And now comes the fun part.</p>
<p>We remove the dots from our list with <code>list-style: none;</code>, and add a little padding to our list elements. We&#8217;ll look at the nth-child selectors in bits. Check out the first one:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">ul li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span>odd<span style="color: #00AA00;">&#41;</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.1</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span>odd<span style="color: #00AA00;">&#41;</span><span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.3</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>	
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span>even<span style="color: #00AA00;">&#41;</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.3</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span>even<span style="color: #00AA00;">&#41;</span><span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.5</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>We choose every second <code>li</code> element, and add a background to it. In this case, we choose a dark gray, and set the opacity to 0.1 (RGBA is new in CSS3), so we can see the background through the <code>li</code> elements. We do exactly the same for our even elements, with the opacity set to 0.3. This is just basic zebra striping. You can add several selectors to an element, so we also add a hover background color a little darker than the original element.</p>
<p>Next, we target <code>3n+1</code>—that is, every third element, starting with the first.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">ul li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span>3n<span style="color: #00AA00;">+</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span> <span style="color: #00AA00;">&#123;</span>
	-webkit-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>-0.6deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	-moz-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>-0.6deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>-0.6deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>We rotate the list element by -0.6 degrees. We do the same thing for both <code>3n+2</code> (every third element, starting with the second) and <code>3n+3</code> (you get the idea). By rotating every third element, and doing zebra striping with every second element, the list seems sort of random, which, I think, is a really cool effect. </p>
<p>If you use Safari, Firefox or Chrome, this is what you should have:<br />
<a class="lightbox postimg"  title ="Mess List" href="http://stiern.com/site/wp-content/everything/messylist.png"><img src="http://stiern.com/site/wp-content/everything/messylist.png" alt="" title="Mess List" width="540" height="267" class="alignnone size-full wp-image-932" /></a></p>
<p><b>UPDATE:</b> You can target Opera with the following (thanks to <a href="http://stiern.com/tutorials/create-a-cool-messy-list-with-css3-and-nth-child/comment-page-1#comment-5821">ToMzorz</a>):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">-o-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>-0.6deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span></pre></td></tr></table></div>

<p>You can also check out <a href="http://dl.dropbox.com/u/32709/stiern/messylist/index.html" title="Demo">the demo</a> again, or download the <a href="http://dl.dropbox.com/u/32709/stiern/messylist/messylist.zip" title="Source code">source code</a>.</p>
<p>Thanks for reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/tutorials/create-a-cool-messy-list-with-css3-and-nth-child/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Should Comment Forms Have More Fields?</title>
		<link>http://stiern.com/articles/should-comment-forms-have-more-fields/</link>
		<comments>http://stiern.com/articles/should-comment-forms-have-more-fields/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 23:41:43 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Comments]]></category>
		<category><![CDATA[Discussion]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://stiern.com/?p=879</guid>
		<description><![CDATA[Often, when you visit a website, you&#8217;ll want to leave a comment there. To do that, you&#8217;ll of course write some text in a comment form. But most comment forms, regardless of their design, look the same. Sure, some do add that hated captcha field, but still, most comment forms are the same. But should<a href="http://stiern.com/articles/should-comment-forms-have-more-fields/" class="read-more">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>Often, when you visit a website, you&#8217;ll want to leave a comment there. To do that, you&#8217;ll of course write some text in a comment form. But most comment forms, regardless of their design, look the same. Sure, some do add that hated captcha field, but still, most comment forms are the same.</p>
<p><span id="more-879"></span></p>
<p>But should they be? This post is in not an answer, it is an introduction to discussion—and hopefully reflection.</p>
<p>So, which comment fields do we see in comment forms today?</p>
<h3>Name</h3>
<p>Name is pretty obvious. We need a name to know who writes the comment.</p>
<h3>E-mail</h3>
<p>Is the e-mail field necessary? Well, many websites uses an e-mail field in the fight against spam. But is that really necessary? Most spam bots can figure out how to put an &#8216;@&#8217; between two words in order to cheat. Still, it&#8217;s better to have a little security than none at all.</p>
<h3>Website</h3>
<p>In this field, the user can put the URL to their website—if they have one. Most people that visit my website don&#8217;t have a website—at least they don&#8217;t write the URL in the website field.</p>
<h3>Comment</h3>
<p>This field is of course obvious, as it is the comment itself.</p>
<p>So, these four fields are the basics of a standard comment form. But what could we else be needing? Let&#8217;s look at where we might be able to improve.</p>
<h3>Headlines</h3>
<p>Why not give your users the possibility to give their comment a headline? It, of course, depends on each website, but headlines can be a good way to summarize a comment, and help people find the comment they are looking for a lot faster.</p>
<h3>Age</h3>
<p>Depending on your site&#8217;s topic, age might be a good field to add. It might even replace the name field in case the site is based on the anonymity of the user.</p>
<h3>Gender</h3>
<p>Like with age, a site allowing you to be anonymous would be a good place to use a gender field in your comment section.</p>
<h3>Social media</h3>
<p>Social media is here to stay. Whether it&#8217;s <a title="Facebook" href="http://facebook.com">Facebook</a>, <a title="Twitter" href="http://twitter.com">Twitter</a>, <a title="Flickr" href="http://flickr.com">Flickr</a>, etc., social media connects people. And even though the primary function of a comment section on a website is not to connect people, I don&#8217;t see why we can&#8217;t add to social media by letting our users link to their social media accounts in a comment form.</p>
<p>Let your users write the URL to their Facebook account, their Flickr user name, their Last.fm account, whatever! Still, you shouldn&#8217;t let it get too clumsy by filling the comments up with way too much information. If there&#8217;s no need to let them write it, don&#8217;t give them the option.</p>
<p>If those reading the comment find one comment particularily interesting, it is very easy to get in touch with the person who wrote it, as the e-mail address isn&#8217;t public.</p>
<h3>Category</h3>
<p>You might want your users to give different categories of comments, such as review, support, criticism, etc. The comments can be styled in different colors or within tabs. A great example of this is <a title="The Idea Shower" href="http://www.ideashower.com/ideas/launched/css-text-wrapper/">The Idea Shower</a>, as seen in the picture below.</p>
<p><a class="lightbox postimg" title="Example from The Idea Shower" href="http://stiern.com/site/wp-content/everything/comment_example.png"><img class="alignnone size-full wp-image-885" title="Example from The Idea Shower" src="http://stiern.com/site/wp-content/everything/comment_example.png" alt="" width="500" height="575" /></a></p>
<h3>Final Thoughts</h3>
<p>Remember, before everything, that you shouldn&#8217;t add a field if there is no use for them. The most important part of the comment is the comment itself—<em>don&#8217;t confuse your visitors with too much information</em>; you still want your comments to be readable.</p>
<p>This was my thoughts about adding new fields to a comment form. What do you think? Do you think it should stay the way it is or should we take advantage of being able to make every comment form different? Please write you comment in the standard comment form below…</p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/articles/should-comment-forms-have-more-fields/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>How to Use Directions with Google Maps API V3</title>
		<link>http://stiern.com/tutorials/how-to-use-directions-with-google-maps-api-v3/</link>
		<comments>http://stiern.com/tutorials/how-to-use-directions-with-google-maps-api-v3/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 08:20:59 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://stiern.com/?p=801</guid>
		<description><![CDATA[Google Maps are more fun when you can get directions. And now you can! The recent release of the Google Maps API adds two new classes in order to enable directions. In this article I will show you how to add an input field in an infobox and use that to render a route.]]></description>
			<content:encoded><![CDATA[<p><strong>NOTE: This article is old, and the methods to insert directions have changed — this probably won&#8217;t work.</strong></p>
<p>Google Maps are more fun when you can get directions. And now you can! The recent release of the Google Maps API adds two new classes in order to enable directions. In this article I will show you how to add an input field in an infobox and use that to render a route.</p>
<p><span id="more-801"></span></p>
<p>But before that, here&#8217;s how it looks when it is done:</p>
<div class="iframe-wrapper">
  <iframe src="http://dl.getdropbox.com/u/32709/googlemaps_dir/index.html" frameborder="0" style="height:300px;width:500px;">Please upgrade your browser</iframe>
</div>
<p>Because of the size at the page here the infobox gets a scroll bar, but just ensure to make your map large enough, then it will not happen.</p>
<h3>Overview</h3>
<ul>
<li><a href="#whatsnew">What&#8217;s New?</a></li>
<li><a href="#corrections">Corrections</a></li>
<p><a href="#corrections"> </a></p>
<li><a href="#directions">The Directions</a></li>
<li><a href="#calcRoute">Calculating the Route</a></li>
<li><a href="#conclusion">Conclusion</a></li>
<p><a href="#conclusion"> </a></ul>
<p><a href="#conclusion"> </a></p>
<h3><a id="whatsnew">What&#8217;s New?</a></h3>
<p>Since my <a title="Adding Custom Google Maps to Your Website" href="http://stiern.com/tutorials/adding-custom-google-maps-to-your-website">last article</a> a couple of new features have been added to the API, as you can also read about in the <a title="Google Maps API V3 changelog" href="http://code.google.com/p/gmaps-api-issues/wiki/JavascriptMapsAPIv3Changelog">changelog</a>. The most important, in my opinion, is of course the support of directions, and that&#8217;s the only function I will discuss here. Worthy to note, though — you do not have to use an API code anymore.</p>
<p>The support for directions is possible via two new classes, <code>DirectionsRenderer</code> and <code>DirectionsService</code>. <code>DirectionsRenderer</code>… Well… Renders the directions, and <code>DirectionsService</code> computes the actual directions. But the big question is — how do we use them?</p>
<h3><a id="corrections">Corrections</a></h3>
<p>Before we rush into the new code, we should make some corrections in our excisting code. If you haven&#8217;t read my article <a title="Adding Custom Google Maps to Your Website" href="http://stiern.com/tutorials/adding-custom-google-maps-to-your-website">Adding Custom Google Maps to Your Website</a>, do yourself a favor and do so before continuing on this one.</p>
<p>[ad#ad]</p>
<p>Next, look in your code where you define your markers and ensure that your values follow these rules:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> companyImage <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">MarkerImage</span><span style="color: #009900;">&#40;</span>’images<span style="color: #339933;">/</span>logo.<span style="color: #660066;">png</span>’<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">Size</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span><span style="color: #CC0000;">50</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// (width, height)  new google.maps.Point(0,0),  new google.maps.Point(50,50) // (width/2, height) ); var companyShadow = new google.maps.MarkerImage(’images/logo_shadow.png’,  new google.maps.Size(130,50), // (width, height)  new google.maps.Point(0,0),  new google.maps.Point(65,50) // (width/2, height) );</span></pre></div></div>

<p>Dividing the image&#8217;s width by 2 ensures that it&#8217;s the bottom center point of the image that&#8217;ll be used for the marker. Thanks to <a title="JM" href="http://stiern.com/tutorials/adding-custom-google-maps-to-your-website/comment-page-2#comment-2663">JM</a> for this solution.</p>
<h3><a id="directions">The Directions</a></h3>
<p>So, first we have to call the <code>DirectionsService</code> constructor. Before your <code>initialize()</code>, create a new variable:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> directionsService <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">DirectionsService</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Next, we have to create the renderer. Right before the variable you just created, define a new variable <code>directionDisplay</code>. This variable is going to contain the renderer.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> directionDisplay<span style="color: #339933;">;</span></pre></div></div>

<p>In your <code>initialize()</code> function, right after the <code>latLng</code> variable, set the <code>directionDisplay</code> variable to this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">directionsDisplay <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">DirectionsRenderer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Further down in your code, find the <code>map</code> variable (right after the <code>settings</code> variable. Write this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">directionsDisplay.<span style="color: #660066;">setMap</span><span style="color: #009900;">&#40;</span>map<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This renders the marker on the specified map, which in this case is <code>map</code>. Next, let&#8217;s define what we want to write in our infobox by expanding the <code>contentString</code> variable:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">	<span style="color: #003366; font-weight: bold;">var</span> contentString <span style="color: #339933;">=</span> <span style="color: #3366CC;">'
&lt;div id=&quot;content&quot;&gt;'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;div id=&quot;siteNotice&quot;&gt;'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'&lt;/div&gt;
'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;h1 id=&quot;firstHeading&quot; class=&quot;firstHeading&quot;&gt;Høgenhaug&lt;/h1&gt;
'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;div id=&quot;bodyContent&quot;&gt;'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&nbsp;
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
&nbsp;
'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&nbsp;
Find your way here from:
&nbsp;
'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;form action=&quot;index.html&quot;&gt;'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;input id=&quot;start&quot; type=&quot;text&quot; value=&quot;prinsensgade 5, 9000&quot; /&gt;'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;input type=&quot;submit&quot; value=&quot;Find directions&quot; /&gt;&lt;/form&gt;
&nbsp;
'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'&lt;/div&gt;
'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'&lt;/div&gt;
'</span><span style="color: #339933;">;</span></pre></div></div>

<p>Let&#8217;s look a bit into the <code>form</code> used to ask the user for an address:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">	<span style="color: #3366CC;">'
&lt;form action=&quot;index.html&quot;&gt;'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;input id=&quot;start&quot; type=&quot;text&quot; value=&quot;prinsensgade 5, 9000&quot; /&gt;'</span><span style="color: #339933;">+</span>
	<span style="color: #3366CC;">'
&lt;input type=&quot;submit&quot; value=&quot;Find directions&quot; /&gt;&lt;/form&gt;
&nbsp;
'</span><span style="color: #339933;">+</span></pre></div></div>

<p>First, we write &#8220;index.html&#8221; in our <code>action</code> attribute. This path should be to the file where your map is placed. In <code>onsubmit</code> we call the function <code>calcRoute()</code> (which we will define later), and next we write <code>return false</code> to prevent the site from reloading when the user submits the form. The next two lines should be pretty self-explainable. If you want the user to be able to enter both addresses, you can just add an extra input field called <code>end</code>. The value of the <code>start</code> field can be empty or you can write a pre-defined address.</p>
<h3><a id="calcRoute">Calculating the Route</a></h3>
<p>At the very end of the <code>initialize()</code> function, write the following:</p>
<p>In the <code>form</code> we called the function <code>calcRoute()</code>. That&#8217;s the one we are defining here. The first thing to do is define the two variables <code>start</code> and <code>end</code>. If you inserted an extra input field before write <code>document.getElementById("end").value;</code> in <code>end</code> instead of the coordinates.</p>
<p>Next, define the variable <code>request</code>. The attributes of this one are fairly logical, but let&#8217;s explain them just in case. We define the <code>origin</code> of the route to our variable <code>start</code>, and the destination to <code>end</code>. Also, we define a travelmode —. This can be either <code>DRIVING</code> or <code>WALKING</code>.</p>
<p>Lastly, insert this code:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">directionsService.<span style="color: #660066;">route</span><span style="color: #009900;">&#40;</span>request<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>response<span style="color: #339933;">,</span> <span style="color: #000066;">status</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">status</span> <span style="color: #339933;">==</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">DirectionsStatus</span>.<span style="color: #660066;">OK</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		directionsDisplay.<span style="color: #660066;">setDirections</span><span style="color: #009900;">&#40;</span>response<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This issues the actual search request, and completes the <code>initialize()</code> function.</p>
<h3><a id="conclusion">Conclusion</a></h3>
<p>With very little effort you can show your visitor how to get to your address directly from your website, instead of sending them to Google Maps or some other place. I hope you enjoyed the tutorial — please let me know if you have questions or suggestions. You are of course free to download the <a title="The source files" href="http://dl.dropbox.com/u/32709/googlemaps_dir/googlemaps_directions.zip">source files</a>.</p>
<p>While you are here, why don&#8217;t you <a title="Follow me on Twitter" href="http://twitter.com/pshoeg">follow me on Twitter</a> or subscribe to the <a title="Subscribe to the RSS feed" href="http://feeds.feedburner.com/stiern">RSS feed</a>?</p>
]]></content:encoded>
			<wfw:commentRss>http://stiern.com/tutorials/how-to-use-directions-with-google-maps-api-v3/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 6/62 queries in 0.100 seconds using disk: basic
Object Caching 619/742 objects using disk: basic

Served from: stiern.com @ 2012-05-17 19:14:50 -->
