<?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>Nathan Loehlein</title>
	<atom:link href="http://nathanloehlein.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nathanloehlein.com</link>
	<description>Design Musings</description>
	<lastBuildDate>Tue, 24 Aug 2010 04:44:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Font Embedding Services</title>
		<link>http://nathanloehlein.com/font-embedding-services/</link>
		<comments>http://nathanloehlein.com/font-embedding-services/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 04:42:12 +0000</pubDate>
		<dc:creator>Nathan Loehlein</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Font Embedding]]></category>
		<category><![CDATA[Fonts]]></category>

		<guid isPermaLink="false">http://nathanloehlein.com/?p=122</guid>
		<description><![CDATA[For the past 15+ years of web development, fonts have been a pretty lackluster area. Choices have mostly revolved around either standard sans-serif or serif fonts, typically Arial or Helvetica for sans-serif and Times New Roman for serif fonts. Lately, all of that has changed. Many modern browsers now support font embedding which enables web [...]]]></description>
			<content:encoded><![CDATA[<p>For the past 15+ years of web development, fonts have been a pretty lackluster area. Choices have mostly revolved around either standard sans-serif or serif fonts, typically Arial or Helvetica for sans-serif and Times New Roman for serif fonts.</p>

<p>Lately, all of that has changed. Many modern browsers now support <a href="http://www.css3.info/preview/web-fonts-with-font-face/" onclick="pageTracker._trackPageview('/outgoing/www.css3.info/preview/web-fonts-with-font-face/?referer=');">font embedding</a> which enables web designers and developers to use seemingly any font they want on their website. However, all is not perfect, as Internet Explorer requires a different format (eot) than Webkit or Firefox (otf or ttf). There is also the ongoing battle in the legality of font embedding, as it requires the downloading of a licensed font to a client&#8217;s machine, even though they haven&#8217;t paid for the font.</p>

<p>This brings another problem: font embedding requires the client to download the entire font file, some of which can reach into the hundreds of kilobytes. Even with widespread broadband, this can slow page loading or flash fonts in a different font-face until the custom font downloads.</p>

<p>Bring along font embedding services. These services tackle the problem of cross-browser compatibility by supplying all the necessary style sheets. They also cover the legal angle by using fonts specially licensed for use on the web. And they help cut down on the file size problem by using compressed files and delivering them on a lightning fast CDN. Using a font embedding service also opens up the possibility that a visitor has already downloaded the file once, which will not require them to download the font again. However, these advantages come with one disadvantage: price. Nearly all of these services require a monthly or yearly fee to use their service. Some do come with trials or a limited selection of fonts, but to truly get the most out of the service you&#8217;re going to have to pony up.</p>

<h4>The Services</h4>

<p><strong><a href="http://code.google.com/webfonts" onclick="pageTracker._trackPageview('/outgoing/code.google.com/webfonts?referer=');">Google Font Directory</a></strong><br/>
Pros: Super quick, Free, Most popular<br/>
Cons:  Very Limited Selection of Fonts</p>

<p><strong><a href="http://typekit.com/" onclick="pageTracker._trackPageview('/outgoing/typekit.com/?referer=');">Typekit</a></strong><br/>
Pros: Popular, Free Trial (limited fonts and uses), Large Selection, Relatively Cheap<br/>
Cons: Pay for service</p>

<p><strong><a href="http://www.webtype.com" onclick="pageTracker._trackPageview('/outgoing/www.webtype.com?referer=');">Webtype</a></strong><br/>
Pros: Professional fonts, backed by font foundries<br/>
Cons: Pay per font for licensing gets expensive quickly</p>

<p><strong><a href="http://www.extensis.com/en/WebINK/" onclick="pageTracker._trackPageview('/outgoing/www.extensis.com/en/WebINK/?referer=');">WebINK</a></strong><br/>
Pros: Monthly Pricing, Neat Font Explorer Tool<br/>
Cons: Only allowed a maximum of 4 websites</p>

<p>If you&#8217;re a web designer or developer who will be using custom fonts on many client sites, Typekit and Google are your best option simply because they are the most generous in how you can use their fonts. If you&#8217;re just looking to spice up your own blog it pays to check out each service for the unique fonts they offer.</p>]]></content:encoded>
			<wfw:commentRss>http://nathanloehlein.com/font-embedding-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Progressive Enhancement</title>
		<link>http://nathanloehlein.com/progressive-enhancement/</link>
		<comments>http://nathanloehlein.com/progressive-enhancement/#comments</comments>
		<pubDate>Mon, 03 May 2010 04:31:29 +0000</pubDate>
		<dc:creator>Nathan Loehlein</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Progressive Enhancement]]></category>

		<guid isPermaLink="false">http://nathanloehlein.com/?p=110</guid>
		<description><![CDATA[Progressive enhancement is the notion of building a basic design for older browsers (think IE6, FF1.5, etc), and then adding more design (usually in CSS) to enhance the look in newer browsers. For example, a design may require a text-shadow on all h1 elements, but it may not be so important or practical as to [...]]]></description>
			<content:encoded><![CDATA[<p>Progressive enhancement is the notion of building a basic design for older browsers (think IE6, FF1.5, etc), and then adding more design (usually in CSS) to enhance the look in newer browsers. For example, a design may require a text-shadow on all <strong>h1</strong> elements, but it may not be so important or practical as to need images for all <strong>h1</strong>s (for example, in a blog). The <em>text-shadow</em> property is not supported in FF 3.0, and any version of IE (thus far). However, users in other browsers will still be able to view the text shadow. In many cases, progressive enhancement is only used on properties which aren&#8217;t critical to the design, but add nice touches when browsers support them.</p>

<p>A great resource to tell what is and isn&#8217;t going to work in various browser versions is <a href="http://caniuse.com/" onclick="pageTracker._trackPageview('/outgoing/caniuse.com/?referer=');">When Can I Use</a>. WCIU provides a great interface to check up on browsers which make up 99% of the browser market. WCIU also gives a good overview of if you can safely use a property today or if you should implement backup methods.</p>

<p>For more reading on progressive enhancement check out <a href="http://www.onextrapixel.com/2010/03/26/progressive-enhancement-what-it-is-and-how-to-use-it/" onclick="pageTracker._trackPageview('/outgoing/www.onextrapixel.com/2010/03/26/progressive-enhancement-what-it-is-and-how-to-use-it/?referer=');">Onextrapixel&#8217;s writeup</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://nathanloehlein.com/progressive-enhancement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Tip: Inline vs. Block Elements</title>
		<link>http://nathanloehlein.com/quick-tip-inline-vs-block-elements/</link>
		<comments>http://nathanloehlein.com/quick-tip-inline-vs-block-elements/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 01:45:39 +0000</pubDate>
		<dc:creator>Nathan Loehlein</dc:creator>
				<category><![CDATA[Quick Tip]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://nathanloehlein.com/?p=107</guid>
		<description><![CDATA[Nearly all HTML elements fall into one of two categores: inline and block. Inline elements do not break the flow of a document. For example, if you write: &#60;p&#62;This is a paragraph in a page.&#60;/p&#62; The span element is inline. Conversely the p element is a block element. Some important distinctions: Inline elements can be [...]]]></description>
			<content:encoded><![CDATA[<p>Nearly all HTML elements fall into one of two categores: inline and block. Inline elements do not break the flow of a document. For example, if you write:</p>
<pre><code>&lt;p&gt;This is a <span>paragraph</span> in a page.&lt;/p&gt;</code></pre>
<p>The <strong>span</strong> element is inline. Conversely the <strong>p</strong> element is a block element.</p>
<p>Some important distinctions:</p>
<p>Inline elements can be placed inside of other inline elements, as well as inside block elements. Inline elements also can not usually have a set width or height since doing so would break the flow.</p>
<p>Block elements cannot be placed inside of inline elements, however they can be placed inside other block elements. Block elements can have a specific width and height set.</p>]]></content:encoded>
			<wfw:commentRss>http://nathanloehlein.com/quick-tip-inline-vs-block-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Label-less forms, the right way.</title>
		<link>http://nathanloehlein.com/label-less-forms-the-right-way/</link>
		<comments>http://nathanloehlein.com/label-less-forms-the-right-way/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 01:10:07 +0000</pubDate>
		<dc:creator>Nathan Loehlein</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[Inputs]]></category>
		<category><![CDATA[Labels]]></category>

		<guid isPermaLink="false">http://nathanloehlein.com/?p=93</guid>
		<description><![CDATA[Lately I&#8217;ve seen a lot of forms that attempt to put the label for the input inside of the input to save space, such as is written here. Unfortunately, it seems a lot of these are done incorrectly. Typical case: &#60;input type="text" name="fname" value="First Name" onfocus="this.value=''" /&#62; Another example This presents a couple of problems, [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;ve seen a lot of forms that attempt to put the label for the input inside of the <strong>input </strong>to save space, such as is written here. Unfortunately, it seems a lot of these are done incorrectly.</p>
<p>Typical case:</p>
<pre><code>&lt;input type="text" name="fname" value="First Name" onfocus="this.value=''" /&gt;</code></pre>
<p><a href="http://www.siteexperts.com/tips/elements/ts27/page1.asp" onclick="pageTracker._trackPageview('/outgoing/www.siteexperts.com/tips/elements/ts27/page1.asp?referer=');">Another example</a></p>
<p>This presents a couple of problems, the first of which is the fact that each input is supposed to have a <strong>label</strong> element associated with it so that screenreaders can correctly read and interpret the form. The second issue is that once the<strong> input</strong> focused, if the user tabs through the form quickly, they suddenly have no clue what to input into each field. Also, if the user goes back to edit the field, they lose their data that they had previously entered.</p>
<p>Luckily, with a little bit of jQuery we can clear up these problems. The first step is to add a <strong>label</strong> element to the input. The <em>for</em> attribute associates the label with the input of the same <em>name</em>, in this case &#8220;fname&#8221;.</p>
<pre><code>&lt;div class="input-wrapper"&gt;
&lt;label for="fname"&gt;First Name&lt;/label&gt;
&lt;input type="text" name="fname" value="" /&gt;
&lt;/div&gt;</code></pre>
<p>You&#8217;ll notice I also added a <strong>div</strong> to wrap the <strong>input</strong> and <strong>label</strong>, which we will use to correctly position the elements. I also removed the default value and the onfocus event, as they will not be needed. Now a little CSS.</p>
<pre><code>div.input-wrapper {
position:relative;
width:100px;
height:20px;
z-index:1;
}
div.input-wrapper label {
position:absolute;
top:2px;
left:4px;
z-index:3;
font-size:16px;
}
div.input-wrapper input {
position:absolute;
width:92px;
height:16px;
font-size:16px;
padding:2px 4px;
top:0;
left:0;
z-index:2;
}</code></pre>
<p>The <strong>div</strong> is given a relative position so that the elements inside of it can be positioned absolutely relative to the div, rather than relative to the document. I gave it an arbitrary width and height; you will have to adjust for your needs. The <strong>label</strong> is then positioned absolutely. I like to pad my inputs so i mimicked the padding by positioning the label 2px from the top and 4px from the left. I gave the label a z-index of +1 to the input so that it will appear over the input. Lastly, the <strong>input</strong> is also positioned absolutely and then padded to fit the text size.</p>
<p>Now for the jQuery:</p>
<pre><code>$("div.input-wrapper label").click(function(){
$(this).next("input").focus();
});

$("div.input-wrapper input").focus(function(){
$(this).prev("label").hide();
});

$("div.input-wrapper input").blur(function(){
var val = $(this).val();
if (val=="") {
$(this).prev("label").show();
}
});</code></pre>
<p>The first block allows the user to click the label to focus the <strong>input</strong>. The second block takes place when the user actually focuses the element, and hides the <strong>label</strong>. You could also use animate() here to fade out the text, but I kept it simple. The third block will show the label again if a user leaves an input without any information in it, so they can easily see what belongs in each input.</p>

<p>This is a rough example, and there are a lot of tweaks you can do to enhance the usability as well as the user experience. let me know if you&#8217;ve used this or a similar trick!</p>]]></content:encoded>
			<wfw:commentRss>http://nathanloehlein.com/label-less-forms-the-right-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Tip: Button States</title>
		<link>http://nathanloehlein.com/quick-tip-button-states/</link>
		<comments>http://nathanloehlein.com/quick-tip-button-states/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 01:30:34 +0000</pubDate>
		<dc:creator>Nathan Loehlein</dc:creator>
				<category><![CDATA[Quick Tip]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Buttons]]></category>
		<category><![CDATA[Navigation]]></category>

		<guid isPermaLink="false">http://nathanloehlein.com/?p=81</guid>
		<description><![CDATA[If you&#8217;re working with a web designer, make sure they provide 4 states for all buttons and navigation: Inactive (can&#8217;t be clicked), Dormant (waiting to be clicked), Rollover, Active (or current).]]></description>
			<content:encoded><![CDATA[If you&#8217;re working with a web designer, make sure they provide 4 states for all buttons and navigation: Inactive (can&#8217;t be clicked), Dormant (waiting to be clicked), Rollover, Active (or current). ]]></content:encoded>
			<wfw:commentRss>http://nathanloehlein.com/quick-tip-button-states/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t Use Your Host to Register Your Domain</title>
		<link>http://nathanloehlein.com/dont-use-your-host-to-register-your-domain/</link>
		<comments>http://nathanloehlein.com/dont-use-your-host-to-register-your-domain/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 01:30:25 +0000</pubDate>
		<dc:creator>Nathan Loehlein</dc:creator>
				<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Domain Name]]></category>
		<category><![CDATA[Domains]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Registration]]></category>

		<guid isPermaLink="false">http://nathanloehlein.com/?p=76</guid>
		<description><![CDATA[It seems like a great way to keep everything under one umbrella: your host offers a free registration of domain name. Everything is great until you need bigger, better hosting, or your hosting becomes a little less reliable than desired, and then the problems begin. It&#8217;s generally not too hard to get your files or [...]]]></description>
			<content:encoded><![CDATA[It seems like a great way to keep everything under one umbrella: your host offers a free registration of domain name. Everything is great until you need bigger, better hosting, or your hosting becomes a little less reliable than desired, and then the problems begin. It&#8217;s generally not too hard to get your files or databases off of your host: a simple ftp download and DB backup and you&#8217;re set. However, getting &#8220;your&#8221; domain name out of their hands is another matter. Often, in the fine print, the host may say that since they are registering the domain name for you for free, they own it, and you&#8217;re out of luck to get it back. Even if that isn&#8217;t the case, you usually have to jump through a hundred hoops to get your domain transferred; from unlocking the domain to approving the transfer, all of which are controlled by your host.

I always recommend purchasing your domains through an approved reseller and then changing the DNS settings to point at your host. This way, you are completely in control of your domain.]]></content:encoded>
			<wfw:commentRss>http://nathanloehlein.com/dont-use-your-host-to-register-your-domain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Building Blocks</title>
		<link>http://nathanloehlein.com/html5-building-blocks/</link>
		<comments>http://nathanloehlein.com/html5-building-blocks/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 01:30:09 +0000</pubDate>
		<dc:creator>Nathan Loehlein</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://nathanloehlein.com/?p=56</guid>
		<description><![CDATA[As HTML5 gets better adoption throughout the browser market, more web developers are beginning to use it in production sites. Firefox and Chrome have no problem handling HTML5 in their latest incarnations, and with the IE HTML5 Enabling Script even IE can begin to display HTML5 elements. The next step is to learn what new [...]]]></description>
			<content:encoded><![CDATA[As HTML5 gets better adoption throughout the browser market, more web developers are beginning to use it in production sites. Firefox and Chrome have no problem handling HTML5 in their latest incarnations, and with the <a href="http://remysharp.com/2009/01/07/html5-enabling-script/" onclick="pageTracker._trackPageview('/outgoing/remysharp.com/2009/01/07/html5-enabling-script/?referer=');">IE HTML5 Enabling Script</a> even IE can begin to display HTML5 elements.

The next step is to learn what new elements HTML5 brings to the table and their purpose. While the specifications are still a work in progress by the W3C, many of the elements are pretty well-defined.

The first, and perhaps biggest change is the changes to the <strong>doctype</strong> tag. Previously, a doctype for a page looked something like: <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
 "http://www.w3.org/TR/html4/strict.dtd"&gt;</code></pre> That&#8217;s long, and pretty useless, and impossible for anyone to remember. In html5, the new <strong>doctype</strong> tag looks like so:<pre><code>&lt;!DOCTYPE HTML&gt;</code></pre> A lot shorter, easy to remember, and backwards compatible.

Some of the other big changes include more semantic tags to replace the div-itis problem that has cropped up recently. These tags include <strong>article</strong>, <strong>section</strong>, <strong>aside</strong>, <strong>header</strong>, <strong>footer</strong>, <strong>nav</strong>. It&#8217;s immediately obvious why these are a better choice than the lowly <strong>div</strong> tag: you can instantly tell what that section of content is for, which helps Google and other search engines get a better idea of the important content on your site, especially if your divs don&#8217;t have semantic ids.
HTML4:
<pre><code>&lt;div id="head"&gt;
 &lt;div id="nav"&gt;
  &lt;ul&gt;
   &lt;li&gt;<a href="#">Link</a>&lt;/li&gt;
   ...
  &lt;/ul&gt;
 &lt;/div&gt;<!--end#nav-->
&lt;/div&gt;<!--end#head-->
&lt;div id="content"&gt;
 ...
&lt;/div&gt;<!--end#content-->
&lt;div id="sidebar"&gt;
 ...
&lt;/div&gt;<!--end#sidebar--></code></pre>
HTML5:
<pre><code>&lt;header&gt;
 &lt;nav&gt;
  <a href="#">Link</a>
  ...
 &lt;/nav&gt;
&lt;/header&gt;
&lt;article&gt;
 ...
&lt;/article&gt;
&lt;aside&gt;
 ...
&lt;/aside&gt;</code></pre>
Much shorter and cleaner. Closed tags are a lot easier to understand. Hopefully this provides a good overview of new HTML5 elements you can use now.]]></content:encoded>
			<wfw:commentRss>http://nathanloehlein.com/html5-building-blocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Tip: jQuery Shorthand</title>
		<link>http://nathanloehlein.com/jquery-shorthand/</link>
		<comments>http://nathanloehlein.com/jquery-shorthand/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 21:10:30 +0000</pubDate>
		<dc:creator>Nathan Loehlein</dc:creator>
				<category><![CDATA[Quick Tip]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Shorthand]]></category>

		<guid isPermaLink="false">http://nathanloehlein.com/?p=51</guid>
		<description><![CDATA[If you&#8217;re tired of writing $(document).ready(function() { for every jQuery file, try $(function() { instead.]]></description>
			<content:encoded><![CDATA[If you&#8217;re tired of writing <pre><code>$(document).ready(function() {</code></pre> for every jQuery file, try <pre><code>$(function() {</code></pre> instead.]]></content:encoded>
			<wfw:commentRss>http://nathanloehlein.com/jquery-shorthand/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s Alive</title>
		<link>http://nathanloehlein.com/its-alive/</link>
		<comments>http://nathanloehlein.com/its-alive/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 21:07:11 +0000</pubDate>
		<dc:creator>Nathan Loehlein</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[blog-related]]></category>

		<guid isPermaLink="false">http://nathanloehlein.com/?p=49</guid>
		<description><![CDATA[Although still in progress, the blog is now up and running!]]></description>
			<content:encoded><![CDATA[Although still in progress, the blog is now up and running!]]></content:encoded>
			<wfw:commentRss>http://nathanloehlein.com/its-alive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
