<?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>Programming Blog &#187; programming</title>
	<atom:link href="http://www.neurosoftware.ro/programming-blog/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.neurosoftware.ro/programming-blog</link>
	<description>Web development , php , ajax , symfony, framework, zend</description>
	<lastBuildDate>Thu, 18 Aug 2011 08:11:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How To Develop Using HTML5: Demo Part 2</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-using-html5-demo-part-2-2/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-using-html5-demo-part-2-2/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 01:41:00 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[article class]]></category>
		<category><![CDATA[demo page]]></category>
		<category><![CDATA[div id]]></category>
		<category><![CDATA[header footer]]></category>
		<category><![CDATA[last time]]></category>
		<category><![CDATA[level structure]]></category>
		<category><![CDATA[lt]]></category>
		<category><![CDATA[section id]]></category>
		<category><![CDATA[semantic elements]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-using-html5-demo-part-2-2/</guid>
		<description><![CDATA[The new semantic elements in html5 are fairly easy to understand, but to really become comfortable using them you need to actually use them in documents. To get myself started I created a demo page representing a typical blog post and developed it using html5. Last time we started looking at that demo page and [...]]]></description>
			<content:encoded><![CDATA[<p>The new <a href="http://www.vanseodesign.com/web-design/html5-semantic-elements/">semantic elements in html5</a> are fairly easy to understand, but to really become comfortable using them you need to actually use them in documents. To get myself started I created a demo page representing a typical blog post and developed it using html5.<br />
<span></span><br />
<a href="http://www.vanseodesign.com/web-design/html5-semantic-elements/">Last time </a>we started looking at that <a href="http://vanseodesign.com/blog/demo/html5-semantics/">demo page</a> and I was explaining some of my choices. As a quick reminder here&#8217;s the high level structure of the page.</p>
<pre>
<span>&lt;div id=<span>&quot;wrapper&quot;</span>&gt;</span>
	<span>&lt;header id=<span>&quot;masthead&quot;</span> role=<span>&quot;banner&quot;</span>&gt;</span><span>&lt;/header&gt;</span>
	<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span><span>&lt;/div&gt;</span>
	<span>&lt;aside class=<span>&quot;primary&quot;</span>&gt;</span><span>&lt;/aside&gt;</span>
	<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span><span>&lt;/div&gt;</span>
	<span>&lt;footer class=<span>&quot;contentinfo&quot;</span> role=<span>&quot;contentinfo&quot;</span>&gt;</span><span>&lt;/footer&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>We already talked about why I chose this structure and then dug into the header and aside elements. Let&#8217;s pick right up and move on to the main content div.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/demo-31.png" alt="Screenshot of the html5 demo" width="465" height="416" /></a></p>
<h2>Content Div</h2>
<p>There&#8217;s quite a bit going on inside this div so let&#8217;s first look at the general structure.</p>
<pre>
<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
	<span>&lt;article class=<span>&quot;post&quot;</span>&gt;</span>
		<span>&lt;header class=<span>&quot;post-9 hentry&quot;</span>&gt;</span><span>&lt;/header&gt;</span>
		<span>&lt;section&gt;</span><span>&lt;/section&gt;</span>
		<span>&lt;footer class=<span>&quot;meta&quot;</span>&gt;</span><span>&lt;/footer&gt;</span>
		<span>&lt;section id=<span>&quot;comments&quot;</span>&gt;</span><span>&lt;/section&gt;</span>
	<span>&lt;/article&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>As an article should be self-contained <a href="http://www.vanseodesign.com/marketing/content-strategy/">content</a> it probably seems intuitive that it would include a header, footer, and sections of content. The inclusion of the comments might seem a little odd and it was another place I went with my gut.</p>
<p>You could make the argument that comments on the post should be a separate article instead of being included in the main article.</p>
<p>When you currently subscribe to a blog you&#8217;re delivered posts, though typically not the comments. You could also subscribe to the comments, but then those are usually considered a different subscription and are delivered without the post.</p>
<p>The above is suggesting the use of 2 separate articles in html5 and perhaps that would have been the better choice.</p>
<p>Ask me again in a few weeks and I might recommend taking the comments out of the post article and placing them instead in another article (instead of a section) below the post article.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/demo-content-header1.png" alt="Screenshot of the content header" width="465" height="232" /></a></p>
<h3>Header</h3>
<p>As you&#8217;d expect the header begins with an h1 tag. I want to call your attention to a couple of other things.</p>
<pre>
<span>&lt;header class=<span>&quot;post-9 hentry&quot;</span>&gt;</span>
	<span>&lt;h1&gt;</span><span>&lt;/h1&gt;</span>
	<span>&lt;small class=<span>&quot;meta&quot;</span>&gt;</span>
	<span>&lt;time datetime=<span>&quot;2011-07-07&quot;</span> pubdate&gt;</span>Wednesday, July 7, 2011<span>&lt;/time&gt;</span> <span>&lt;address class=<span>&quot;vcard&quot;</span>&gt;</span>by <span>&lt;a class=<span>&quot;url n fn&quot;</span> rel=<span>&quot;author&quot;</span> href=<span>&quot;&quot;</span> title=<span>&quot;View Steven Bradley&#039;s profile&quot;</span>&gt;</span>Steven Bradley<span>&lt;/a&gt;</span><span>&lt;/address&gt;</span>	<span>&lt;/small&gt;</span>
	<span>&lt;p class=<span>&quot;intro&quot;</span>&gt;</span><span>&lt;/p&gt;</span>
	<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
<span>&lt;/header&gt;</span>
</pre>
<p>First is that I&#8217;ve used the time and address tags. The the former because I was adding a date and the latter to mark up my name as an <a href="http://www.google.com/search?q=hcard&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t&amp;rls=org.mozilla:en-US:official&amp;client=firefox-a">hCard</a>.</p>
<p>The other thing to note is that this header closes with a couple of paragraphs of introductory text. It could have been included in a new section following the header, but sections typically (though not always) will include a header or at least a new heading.</p>
<p>Since these paragraphs are falling under the main h1 and are meant to be introductory text, it made more sense to me to include them here.</p>
<h3>Section</h3>
<p>Most of the post content follows the same <a href="http://www.vanseodesign.com/web-design/structures-patterns-textures/">pattern</a>. Each time a new heading is encountered I set up a new section, with that heading and some paragraphs of text. The paragraphs could also be lists and blockquotes, etc.</p>
<pre>
<span>&lt;section&gt;</span>
	<span>&lt;h2&gt;</span><span>&lt;/h2&gt;</span>
	<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
	<span>&lt;section&gt;</span>
		<span>&lt;h3&gt;</span><span>&lt;/h3&gt;</span>
		<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
	<span>&lt;/section&gt;</span>
	<span>&lt;section&gt;</span>
		<span>&lt;h3&gt;</span><span>&lt;/h3&gt;</span>
		<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
	<span>&lt;/section&gt;</span>
	<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
<span>&lt;/section&gt;</span>
</pre>
<p>When the new heading is lower in the <a href="http://www.vanseodesign.com/web-design/counterpart-and-counterpoint-in-typographic-hierarchy/">hierarchy</a> its section is nested. h3 sections are nested inside h2 sections. Had I used an h4 it would have been nested inside the h3 that came before.</p>
<p>Headings that are siblings get their own section relative to the parent heading.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/demo-content-footer.png" alt="Screenshot of the content  footer" width="465" height="110" /></a></p>
<h3>Footer</h3>
<p>Footers are meant to include content describing the main content. Think meta information. Here I included a paragraph showing how the post was archived and then included a short author bio.</p>
<pre>
<span>&lt;footer class=<span>&quot;meta&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>This post is archived…<span>&lt;/p&gt;</span>
	<span>&lt;section&gt;</span>
		<span>&lt;h1&gt;</span>About Steven Bradley<span>&lt;/h1&gt;</span>
		<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
	<span>&lt;/section&gt;</span>
<span>&lt;/footer&gt;</span>
</pre>
<p>Since author name and description are related I enclosed both inside a new sections.</p>
<p>As I could envision moving the author bio to other types of pages I used an h1. I <a href="http://www.456bereastreet.com/archive/201106/on_using_h1_for_all_heading_levels_in_html5/">wouldn&#8217;t rely on the outline algorithm currently</a>, but here I was pretending it had better browser support in order to play around with it in the demo.</p>
<h3>Comments</h3>
<p>Since each comment is coded the same I&#8217;ll just include one in full in the code below. Each new article at the end would be a new comment. Above all the comments is a heading for the section.</p>
<p>Everything is enclosed in a section since comments on a post are clearly <a href="http://www.vanseodesign.com/web-design/design-basics-repetition/">related</a>. I debated whether or not the entirety of comments should be a single article instead of a section. I think you can make a good argument for that, especially as a full comment stream is often syndicated via rss.</p>
<pre>
<span>&lt;section id=<span>&quot;comments&quot;</span>&gt;</span>
	<span>&lt;h1&gt;</span> 3 Comments<span>&lt;/h1&gt;</span>
	<span>&lt;article class=<span>&quot;comment&quot;</span>&gt;</span>
		<span>&lt;div class=<span>&quot;comment-meta&quot;</span> id=<span>&quot;comment-1&quot;</span>&gt;</span>
			<span>&lt;a href=<span>&quot;&quot;</span> rel=<span>&quot;external nofollow&quot;</span>&gt;</span>Homer Simpson<span>&lt;/a&gt;</span>
			<span>&lt;img src=<span>&quot;&quot;</span> alt=<span>&quot;&quot;</span> class=<span>&quot;avatar&quot;</span> /&gt;</span>
			<span>&lt;time datetime=<span>&quot;&quot;</span> pubdate&gt;</span><span>&lt;/time&gt;</span>
		<span>&lt;/div&gt;</span>
		<span>&lt;div class=<span>&quot;comment-body&quot;</span>&gt;</span>
			<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
		<span>&lt;/div&gt;</span>
	<span>&lt;/article&gt;</span>
	<span>&lt;article class=<span>&quot;comment&quot;</span>&gt;</span><span>&lt;/article&gt;</span>
	<span>&lt;article class=<span>&quot;comment&quot;</span>&gt;</span><span>&lt;/article&gt;</span>
	<span>&lt;article class=<span>&quot;comment&quot;</span>&gt;</span><span>&lt;/article&gt;</span>
<span>&lt;/section&gt;</span>
</pre>
<p>I decided to call it a section, though.</p>
<p>Part of that choice comes from looking at how others treated comments and part because it felt more like the individual comment was the self-contained unit as opposed to all the comments.</p>
<p>Explaining it now I&#8217;m thinking it would have made more sense to consider the entire comment stream as an article with each comment being a nested article within.</p>
<p>What&#8217;s inside each comment isn&#8217;t anything special at this point. I wrapped the comment meta and the comment body in divs. These probably should have been sections instead of divs as the content is related.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/demo-div-footer.png" alt="Screenshot of the footer div" width="465" height="143" /></a></p>
<h2>Footer Div</h2>
<p>This is the footer div that includes the links and the ad. All of this information is tangential, much like the sidebar and so each is an aside.</p>
<p>Remember that we&#8217;re choosing these new semantic elements based on the content they enclose, not the location of the content within the document.</p>
<p>I probably should have chosen a different name for the id to avoid confusion with the html5 footer. A better choice might have been id=&#8221;subfooter&#8221;</p>
<pre>
<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span>
	<span>&lt;aside class=<span>&quot;sub-footer&quot;</span>&gt;</span>
		<span>&lt;h1&gt;</span><span>&lt;/h1&gt;</span>
		<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
		<span>&lt;ul&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
		<span>&lt;/ul&gt;</span>
	<span>&lt;/aside&gt;</span>
	<span>&lt;aside class=<span>&quot;sub-footer&quot;</span>&gt;</span>
		<span>&lt;h1&gt;</span><span>&lt;/h1&gt;</span>
		<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
		<span>&lt;ul&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
		<span>&lt;/ul&gt;</span>
	<span>&lt;/aside&gt;</span>
	<span>&lt;aside class=<span>&quot;advertising&quot;</span>&gt;</span>
		<span>&lt;h1&gt;</span><span>&lt;/h1&gt;</span>
		<span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;img src=<span>&quot;&quot;</span> alt=<span>&quot;&quot;</span> /&gt;</span><span>&lt;/a&gt;</span>
	<span>&lt;/aside&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>Since the three different sets of content aren&#8217;t related I chose to wrap all three in a div instead of a section. The aside is enough to show that the content inside each is related to itself.</p>
<p>Once again I chose not to use a header element inside and just went with the h1. Whether or not headers are needed is something I still need to work out.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/demo-footer.png" alt="Screenshot of the html5 footer" width="465" height="31" /></a></p>
<h2>Footer</h2>
<p>Finally we get the document footer. Since the content here is information about the entire page it&#8217;s enclosed in the main footer for the entire page.</p>
<pre>
<span>&lt;footer role=<span>&quot;contentinfo&quot;</span> class=<span>&quot;contentinfo&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
<span>&lt;/footer&gt;</span>
</pre>
<p>After walking through all of the above code I&#8217;ll assume no additional explanation is needed here.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/ie7-on-xp.png" alt="ie7-on-xp.png" width="465" height="349" /></a></p>
<p>Above: The demo as viewed in Internet Explorer 7 on Windows XP</p>
<h2>Additional Thoughts</h2>
<p>This demo is really one of my first attempts at coding a page in html5. I learned quite a bit, made some observations, and raised a few questions for myself.</p>
<p>Overall it wasn&#8217;t too difficult to get used to html5. The elements themselves are easy to use and for the most part it isn&#8217;t too difficult to know when to use them. Of all of the new elements nav, aside, and footer created the least confusion for me.</p>
<p>It will take some time getting used to the new tags, especially when it comes to developing new best practices, but it was like that when moving from tables to divs and I suspect the transition will be easier this time around.</p>
<p>The header element while simple to use raised questions about how often to use it. Should each new group of sectioning content start with a header? Only when an hx element is present? Can it safely be left out? What advantages does it hold without more support for the <a href="http://www.vanseodesign.com/web-design/html5-content-models">outline algorithm</a>?</p>
<p>The most confusing part was deciding when to use div, section, and article. The definitions of each seems clear enough, but in practice it can be hard to decide which is best to use at times. It&#8217;s not hard to see that I could redevelop this same demo and end up with a new structure of div, section, and article.</p>
<p>I suspect this is what you&#8217;ll find the most challenging and I&#8217;m providing some links to help you sort it out below.</p>
<p>However this really isn&#8217;t all that different from what goes on now. If you and I develop the same design we&#8217;ll likely structure things differently even when only using divs as our main block level element. There really isn&#8217;t a right or wrong way to use the 3 tags and accepting that will probably help clear away the confusion more than anything.</p>
<p>What we&#8217;ll likely see in the coming months and years is a series of best practices for using all of the new elements and we&#8217;ll each pick and choose which best practices work best for us.</p>
<p>After having worked through the demo I&#8217;m much more convinced that we can use these new semantic elements in real projects now.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/ie6-on-xp.png" alt="ie6-on-xp.png" border="0" width="465" height="351" /></a></p>
<p>Above: The demo as viewed in Internet Explorer 6 on Windows XP</p>
<h3>Browsers</h3>
<p>Throughout this 2 part post I&#8217;ve included some screenshots of the demo in Internet Explorer. For the most part they look pretty good. IE6 was the only time the demo looked off as you can see in the screenshot above and the one below.</p>
<p>However as poor as the demo looks in those images it&#8217;s really only a few minor tweaks to fix. Also as I&#8217;ve said a few times here I&#8217;ve dropped support for IE6 so I&#8217;m not really concerned with making those tweaks unless a client specifically requests it.</p>
<p>Unfortunately my Windows testing machine has been on the fritz lately and I wasn&#8217;t able to get good screenshots of how the demo looks in IE when Javascript is disabled.</p>
<p>I managed to grab screenshots where I had removed the link to the html5shiv. The IE6 screenshot is the last image in this post. I suspect that&#8217;s not how it really looks though.</p>
<p>Perhaps the divs I used were enough to keep the layout intact, but I expected the demo to look much worse with Javascript disabled. If someone can grab a screenshot and send it to me I&#8217;ll include it here.</p>
<p>My testing machine should be up and running again in a few days too so I&#8217;ll see if I can grab a screenshot as well.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/ie6-on-xp-bottom1.png" alt="Screenshot of the bottom of the demo page as seen in IE6 on Windows XP" width="465" height="256" /></a></p>
<p>Above: The bottom of the demo page as viewed in Internet Explorer 6 on Windows XP</p>
<h3>Additional Resources</h3>
<p>Here are some of the articles I read trying to sort out using divs, sections, and articles. This post by Oli Studholme, <a href="http://www.vanseodesign.com/HTML5 structure—div, section &amp; article">HTML5 structure&mdash;div, section &amp; article</a>, probably helped me the most with the following 3 questions and answers.</p>
<ul>
<li>Would the enclosed content would make sense on it&#8217;s own in a feed reader? If so use &lt;article&gt;</li>
<li>Is the enclosed content related? If so use &lt;section&gt;</li>
<li>Finally if there&#8217;s no semantic relationship use &lt;div&gt;</li>
</ul>
<p>I also leaned on the articles below quite a bit.</p>
<ul>
<li><a href="http://html5doctor.com/the-section-element/">The section element </a> read through the comments</li>
<li><a href="http://blog.whatwg.org/is-not-just-a-semantic">&lt;section&#038;gt: is not just a &#8220;semantic &#038;lt:div&#038;gt:&#8221;</a></li>
<li><a href="http://adactio.com/journal/1607/">HTML5 test results</a> You&#8217;ll see you aren&#8217;t alone in your confusion</li>
<li><a href="http://adactio.com/journal/1654/">Article of doubt </a></li>
<li><a href="https://developer.mozilla.org/en/Sections_and_Outlines_of_an_HTML5_document">Sections and outlines of an HTML5 document</a></li>
<li><a href="http://www.brucelawson.co.uk/2010/html5-articles-and-sections-whats-the-difference/">HTML5 articles and sections: what’s the difference? </a></li>
</ul>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/ie-6-no-js.png" alt="Screenshot of the demo in IE6 with Javascript disabled" width="465" height="342" /></a></p>
<p>Above: My best attempt at collecting a screenshot in Internet Explorer with Javascript disabled. This is IE6 on Windows XP. I expect this image looks better than the reality.</p>
<h2>Summary</h2>
<p>Hopefully this 2 part walk through of my <a href="http://vanseodesign.com/blog/demo/html5-semantics/">demo</a> has helped make <a href="http://www.456bereastreet.com/archive/201103/html5_sectioning_elements_headings_and_document_outlines/">html5 sectioning elements</a> easier to understand and even better I hope it&#8217;s convinced you to create your own demo page. You&#8217;ll understand these tags much, much better through actual use than reading about what I&#8217;ve done.</p>
<p>Start with a trip through some of the html5 boilerplate templates that are readily available and beginning with one as a shell, develop what might be a typical web page in your workflow.</p>
<p>At first I fell back to using divs as I do now, just to get some kind of structure in place. I then began replacing some of those divs with the new elements and rearranging a few things here and there as I iterated the development of the page.</p>
<p>It really won&#8217;t take long to get used to he new elements, but the only way that will happen is if you take the time to start using them.</p>
<p>For those of you who have started developing with html5 how have you handled the issue of using too many or not enough headers? Have you found it easier to decide when it&#8217;s best to use div, section, and article as you&#8217;ve worked with them more? Are there specific issues that continue to arise for you that I haven&#8217;t mentioned here?</p>
<p><img src="http://www.vanseodesign.com/blog/?ak_action=api_record_view&amp;id=3152&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/EdkNyQm5B6t8j92MvS6_ccevuAQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/EdkNyQm5B6t8j92MvS6_ccevuAQ/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/EdkNyQm5B6t8j92MvS6_ccevuAQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/EdkNyQm5B6t8j92MvS6_ccevuAQ/1/di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/laIazdLufxM" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-using-html5-demo-part-2-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Develop Using HTML5: Demo Part 2</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-using-html5-demo-part-2/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-using-html5-demo-part-2/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 01:40:24 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[article class]]></category>
		<category><![CDATA[demo page]]></category>
		<category><![CDATA[div id]]></category>
		<category><![CDATA[header footer]]></category>
		<category><![CDATA[last time]]></category>
		<category><![CDATA[level structure]]></category>
		<category><![CDATA[lt]]></category>
		<category><![CDATA[section id]]></category>
		<category><![CDATA[semantic elements]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-using-html5-demo-part-2/</guid>
		<description><![CDATA[The new semantic elements in html5 are fairly easy to understand, but to really become comfortable using them you need to actually use them in documents. To get myself started I created a demo page representing a typical blog post and developed it using html5. Last time we started looking at that demo page and [...]]]></description>
			<content:encoded><![CDATA[<p>The new <a href="http://www.vanseodesign.com/web-design/html5-semantic-elements/">semantic elements in html5</a> are fairly easy to understand, but to really become comfortable using them you need to actually use them in documents. To get myself started I created a demo page representing a typical blog post and developed it using html5.<br />
<span></span><br />
<a href="http://www.vanseodesign.com/web-design/html5-semantic-elements/">Last time </a>we started looking at that <a href="http://vanseodesign.com/blog/demo/html5-semantics/">demo page</a> and I was explaining some of my choices. As a quick reminder here&#8217;s the high level structure of the page.</p>
<pre>
<span>&lt;div id=<span>&quot;wrapper&quot;</span>&gt;</span>
	<span>&lt;header id=<span>&quot;masthead&quot;</span> role=<span>&quot;banner&quot;</span>&gt;</span><span>&lt;/header&gt;</span>
	<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span><span>&lt;/div&gt;</span>
	<span>&lt;aside class=<span>&quot;primary&quot;</span>&gt;</span><span>&lt;/aside&gt;</span>
	<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span><span>&lt;/div&gt;</span>
	<span>&lt;footer class=<span>&quot;contentinfo&quot;</span> role=<span>&quot;contentinfo&quot;</span>&gt;</span><span>&lt;/footer&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>We already talked about why I chose this structure and then dug into the header and aside elements. Let&#8217;s pick right up and move on to the main content div.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/demo-31.png" alt="Screenshot of the html5 demo" width="465" height="416" /></a></p>
<h2>Content Div</h2>
<p>There&#8217;s quite a bit going on inside this div so let&#8217;s first look at the general structure.</p>
<pre>
<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
	<span>&lt;article class=<span>&quot;post&quot;</span>&gt;</span>
		<span>&lt;header class=<span>&quot;post-9 hentry&quot;</span>&gt;</span><span>&lt;/header&gt;</span>
		<span>&lt;section&gt;</span><span>&lt;/section&gt;</span>
		<span>&lt;footer class=<span>&quot;meta&quot;</span>&gt;</span><span>&lt;/footer&gt;</span>
		<span>&lt;section id=<span>&quot;comments&quot;</span>&gt;</span><span>&lt;/section&gt;</span>
	<span>&lt;/article&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>As an article should be self-contained <a href="http://www.vanseodesign.com/marketing/content-strategy/">content</a> it probably seems intuitive that it would include a header, footer, and sections of content. The inclusion of the comments might seem a little odd and it was another place I went with my gut.</p>
<p>You could make the argument that comments on the post should be a separate article instead of being included in the main article.</p>
<p>When you currently subscribe to a blog you&#8217;re delivered posts, though typically not the comments. You could also subscribe to the comments, but then those are usually considered a different subscription and are delivered without the post.</p>
<p>The above is suggesting the use of 2 separate articles in html5 and perhaps that would have been the better choice.</p>
<p>Ask me again in a few weeks and I might recommend taking the comments out of the post article and placing them instead in another article (instead of a section) below the post article.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/demo-content-header1.png" alt="Screenshot of the content header" width="465" height="232" /></a></p>
<h3>Header</h3>
<p>As you&#8217;d expect the header begins with an h1 tag. I want to call your attention to a couple of other things.</p>
<pre>
<span>&lt;header class=<span>&quot;post-9 hentry&quot;</span>&gt;</span>
	<span>&lt;h1&gt;</span><span>&lt;/h1&gt;</span>
	<span>&lt;small class=<span>&quot;meta&quot;</span>&gt;</span>
	<span>&lt;time datetime=<span>&quot;2011-07-07&quot;</span> pubdate&gt;</span>Wednesday, July 7, 2011<span>&lt;/time&gt;</span> <span>&lt;address class=<span>&quot;vcard&quot;</span>&gt;</span>by <span>&lt;a class=<span>&quot;url n fn&quot;</span> rel=<span>&quot;author&quot;</span> href=<span>&quot;&quot;</span> title=<span>&quot;View Steven Bradley&#039;s profile&quot;</span>&gt;</span>Steven Bradley<span>&lt;/a&gt;</span><span>&lt;/address&gt;</span>	<span>&lt;/small&gt;</span>
	<span>&lt;p class=<span>&quot;intro&quot;</span>&gt;</span><span>&lt;/p&gt;</span>
	<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
<span>&lt;/header&gt;</span>
</pre>
<p>First is that I&#8217;ve used the time and address tags. The the former because I was adding a date and the latter to mark up my name as an <a href="http://www.google.com/search?q=hcard&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t&amp;rls=org.mozilla:en-US:official&amp;client=firefox-a">hCard</a>.</p>
<p>The other thing to note is that this header closes with a couple of paragraphs of introductory text. It could have been included in a new section following the header, but sections typically (though not always) will include a header or at least a new heading.</p>
<p>Since these paragraphs are falling under the main h1 and are meant to be introductory text, it made more sense to me to include them here.</p>
<h3>Section</h3>
<p>Most of the post content follows the same <a href="http://www.vanseodesign.com/web-design/structures-patterns-textures/">pattern</a>. Each time a new heading is encountered I set up a new section, with that heading and some paragraphs of text. The paragraphs could also be lists and blockquotes, etc.</p>
<pre>
<span>&lt;section&gt;</span>
	<span>&lt;h2&gt;</span><span>&lt;/h2&gt;</span>
	<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
	<span>&lt;section&gt;</span>
		<span>&lt;h3&gt;</span><span>&lt;/h3&gt;</span>
		<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
	<span>&lt;/section&gt;</span>
	<span>&lt;section&gt;</span>
		<span>&lt;h3&gt;</span><span>&lt;/h3&gt;</span>
		<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
	<span>&lt;/section&gt;</span>
	<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
<span>&lt;/section&gt;</span>
</pre>
<p>When the new heading is lower in the <a href="http://www.vanseodesign.com/web-design/counterpart-and-counterpoint-in-typographic-hierarchy/">hierarchy</a> its section is nested. h3 sections are nested inside h2 sections. Had I used an h4 it would have been nested inside the h3 that came before.</p>
<p>Headings that are siblings get their own section relative to the parent heading.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/demo-content-footer.png" alt="Screenshot of the content  footer" width="465" height="110" /></a></p>
<h3>Footer</h3>
<p>Footers are meant to include content describing the main content. Think meta information. Here I included a paragraph showing how the post was archived and then included a short author bio.</p>
<pre>
<span>&lt;footer class=<span>&quot;meta&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>This post is archived…<span>&lt;/p&gt;</span>
	<span>&lt;section&gt;</span>
		<span>&lt;h1&gt;</span>About Steven Bradley<span>&lt;/h1&gt;</span>
		<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
	<span>&lt;/section&gt;</span>
<span>&lt;/footer&gt;</span>
</pre>
<p>Since author name and description are related I enclosed both inside a new sections.</p>
<p>As I could envision moving the author bio to other types of pages I used an h1. I <a href="http://www.456bereastreet.com/archive/201106/on_using_h1_for_all_heading_levels_in_html5/">wouldn&#8217;t rely on the outline algorithm currently</a>, but here I was pretending it had better browser support in order to play around with it in the demo.</p>
<h3>Comments</h3>
<p>Since each comment is coded the same I&#8217;ll just include one in full in the code below. Each new article at the end would be a new comment. Above all the comments is a heading for the section.</p>
<p>Everything is enclosed in a section since comments on a post are clearly <a href="http://www.vanseodesign.com/web-design/design-basics-repetition/">related</a>. I debated whether or not the entirety of comments should be a single article instead of a section. I think you can make a good argument for that, especially as a full comment stream is often syndicated via rss.</p>
<pre>
<span>&lt;section id=<span>&quot;comments&quot;</span>&gt;</span>
	<span>&lt;h1&gt;</span> 3 Comments<span>&lt;/h1&gt;</span>
	<span>&lt;article class=<span>&quot;comment&quot;</span>&gt;</span>
		<span>&lt;div class=<span>&quot;comment-meta&quot;</span> id=<span>&quot;comment-1&quot;</span>&gt;</span>
			<span>&lt;a href=<span>&quot;&quot;</span> rel=<span>&quot;external nofollow&quot;</span>&gt;</span>Homer Simpson<span>&lt;/a&gt;</span>
			<span>&lt;img src=<span>&quot;&quot;</span> alt=<span>&quot;&quot;</span> class=<span>&quot;avatar&quot;</span> /&gt;</span>
			<span>&lt;time datetime=<span>&quot;&quot;</span> pubdate&gt;</span><span>&lt;/time&gt;</span>
		<span>&lt;/div&gt;</span>
		<span>&lt;div class=<span>&quot;comment-body&quot;</span>&gt;</span>
			<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
		<span>&lt;/div&gt;</span>
	<span>&lt;/article&gt;</span>
	<span>&lt;article class=<span>&quot;comment&quot;</span>&gt;</span><span>&lt;/article&gt;</span>
	<span>&lt;article class=<span>&quot;comment&quot;</span>&gt;</span><span>&lt;/article&gt;</span>
	<span>&lt;article class=<span>&quot;comment&quot;</span>&gt;</span><span>&lt;/article&gt;</span>
<span>&lt;/section&gt;</span>
</pre>
<p>I decided to call it a section, though.</p>
<p>Part of that choice comes from looking at how others treated comments and part because it felt more like the individual comment was the self-contained unit as opposed to all the comments.</p>
<p>Explaining it now I&#8217;m thinking it would have made more sense to consider the entire comment stream as an article with each comment being a nested article within.</p>
<p>What&#8217;s inside each comment isn&#8217;t anything special at this point. I wrapped the comment meta and the comment body in divs. These probably should have been sections instead of divs as the content is related.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/demo-div-footer.png" alt="Screenshot of the footer div" width="465" height="143" /></a></p>
<h2>Footer Div</h2>
<p>This is the footer div that includes the links and the ad. All of this information is tangential, much like the sidebar and so each is an aside.</p>
<p>Remember that we&#8217;re choosing these new semantic elements based on the content they enclose, not the location of the content within the document.</p>
<p>I probably should have chosen a different name for the id to avoid confusion with the html5 footer. A better choice might have been id=&#8221;subfooter&#8221;</p>
<pre>
<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span>
	<span>&lt;aside class=<span>&quot;sub-footer&quot;</span>&gt;</span>
		<span>&lt;h1&gt;</span><span>&lt;/h1&gt;</span>
		<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
		<span>&lt;ul&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
		<span>&lt;/ul&gt;</span>
	<span>&lt;/aside&gt;</span>
	<span>&lt;aside class=<span>&quot;sub-footer&quot;</span>&gt;</span>
		<span>&lt;h1&gt;</span><span>&lt;/h1&gt;</span>
		<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
		<span>&lt;ul&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
			<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
		<span>&lt;/ul&gt;</span>
	<span>&lt;/aside&gt;</span>
	<span>&lt;aside class=<span>&quot;advertising&quot;</span>&gt;</span>
		<span>&lt;h1&gt;</span><span>&lt;/h1&gt;</span>
		<span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;img src=<span>&quot;&quot;</span> alt=<span>&quot;&quot;</span> /&gt;</span><span>&lt;/a&gt;</span>
	<span>&lt;/aside&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>Since the three different sets of content aren&#8217;t related I chose to wrap all three in a div instead of a section. The aside is enough to show that the content inside each is related to itself.</p>
<p>Once again I chose not to use a header element inside and just went with the h1. Whether or not headers are needed is something I still need to work out.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/demo-footer.png" alt="Screenshot of the html5 footer" width="465" height="31" /></a></p>
<h2>Footer</h2>
<p>Finally we get the document footer. Since the content here is information about the entire page it&#8217;s enclosed in the main footer for the entire page.</p>
<pre>
<span>&lt;footer role=<span>&quot;contentinfo&quot;</span> class=<span>&quot;contentinfo&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
<span>&lt;/footer&gt;</span>
</pre>
<p>After walking through all of the above code I&#8217;ll assume no additional explanation is needed here.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/ie7-on-xp.png" alt="ie7-on-xp.png" width="465" height="349" /></a></p>
<p>Above: The demo as viewed in Internet Explorer 7 on Windows XP</p>
<h2>Additional Thoughts</h2>
<p>This demo is really one of my first attempts at coding a page in html5. I learned quite a bit, made some observations, and raised a few questions for myself.</p>
<p>Overall it wasn&#8217;t too difficult to get used to html5. The elements themselves are easy to use and for the most part it isn&#8217;t too difficult to know when to use them. Of all of the new elements nav, aside, and footer created the least confusion for me.</p>
<p>It will take some time getting used to the new tags, especially when it comes to developing new best practices, but it was like that when moving from tables to divs and I suspect the transition will be easier this time around.</p>
<p>The header element while simple to use raised questions about how often to use it. Should each new group of sectioning content start with a header? Only when an hx element is present? Can it safely be left out? What advantages does it hold without more support for the <a href="http://www.vanseodesign.com/web-design/html5-content-models">outline algorithm</a>?</p>
<p>The most confusing part was deciding when to use div, section, and article. The definitions of each seems clear enough, but in practice it can be hard to decide which is best to use at times. It&#8217;s not hard to see that I could redevelop this same demo and end up with a new structure of div, section, and article.</p>
<p>I suspect this is what you&#8217;ll find the most challenging and I&#8217;m providing some links to help you sort it out below.</p>
<p>However this really isn&#8217;t all that different from what goes on now. If you and I develop the same design we&#8217;ll likely structure things differently even when only using divs as our main block level element. There really isn&#8217;t a right or wrong way to use the 3 tags and accepting that will probably help clear away the confusion more than anything.</p>
<p>What we&#8217;ll likely see in the coming months and years is a series of best practices for using all of the new elements and we&#8217;ll each pick and choose which best practices work best for us.</p>
<p>After having worked through the demo I&#8217;m much more convinced that we can use these new semantic elements in real projects now.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/ie6-on-xp.png" alt="ie6-on-xp.png" border="0" width="465" height="351" /></a></p>
<p>Above: The demo as viewed in Internet Explorer 6 on Windows XP</p>
<h3>Browsers</h3>
<p>Throughout this 2 part post I&#8217;ve included some screenshots of the demo in Internet Explorer. For the most part they look pretty good. IE6 was the only time the demo looked off as you can see in the screenshot above and the one below.</p>
<p>However as poor as the demo looks in those images it&#8217;s really only a few minor tweaks to fix. Also as I&#8217;ve said a few times here I&#8217;ve dropped support for IE6 so I&#8217;m not really concerned with making those tweaks unless a client specifically requests it.</p>
<p>Unfortunately my Windows testing machine has been on the fritz lately and I wasn&#8217;t able to get good screenshots of how the demo looks in IE when Javascript is disabled.</p>
<p>I managed to grab screenshots where I had removed the link to the html5shiv. The IE6 screenshot is the last image in this post. I suspect that&#8217;s not how it really looks though.</p>
<p>Perhaps the divs I used were enough to keep the layout intact, but I expected the demo to look much worse with Javascript disabled. If someone can grab a screenshot and send it to me I&#8217;ll include it here.</p>
<p>My testing machine should be up and running again in a few days too so I&#8217;ll see if I can grab a screenshot as well.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/ie6-on-xp-bottom1.png" alt="Screenshot of the bottom of the demo page as seen in IE6 on Windows XP" width="465" height="256" /></a></p>
<p>Above: The bottom of the demo page as viewed in Internet Explorer 6 on Windows XP</p>
<h3>Additional Resources</h3>
<p>Here are some of the articles I read trying to sort out using divs, sections, and articles. This post by Oli Studholme, <a href="http://www.vanseodesign.com/HTML5 structure—div, section &amp; article">HTML5 structure&mdash;div, section &amp; article</a>, probably helped me the most with the following 3 questions and answers.</p>
<ul>
<li>Would the enclosed content would make sense on it&#8217;s own in a feed reader? If so use &lt;article&gt;</li>
<li>Is the enclosed content related? If so use &lt;section&gt;</li>
<li>Finally if there&#8217;s no semantic relationship use &lt;div&gt;</li>
</ul>
<p>I also leaned on the articles below quite a bit.</p>
<ul>
<li><a href="http://html5doctor.com/the-section-element/">The section element </a> read through the comments</li>
<li><a href="http://blog.whatwg.org/is-not-just-a-semantic">&lt;section&#038;gt: is not just a &#8220;semantic &#038;lt:div&#038;gt:&#8221;</a></li>
<li><a href="http://adactio.com/journal/1607/">HTML5 test results</a> You&#8217;ll see you aren&#8217;t alone in your confusion</li>
<li><a href="http://adactio.com/journal/1654/">Article of doubt </a></li>
<li><a href="https://developer.mozilla.org/en/Sections_and_Outlines_of_an_HTML5_document">Sections and outlines of an HTML5 document</a></li>
<li><a href="http://www.brucelawson.co.uk/2010/html5-articles-and-sections-whats-the-difference/">HTML5 articles and sections: what’s the difference? </a></li>
</ul>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/ie-6-no-js.png" alt="Screenshot of the demo in IE6 with Javascript disabled" width="465" height="342" /></a></p>
<p>Above: My best attempt at collecting a screenshot in Internet Explorer with Javascript disabled. This is IE6 on Windows XP. I expect this image looks better than the reality.</p>
<h2>Summary</h2>
<p>Hopefully this 2 part walk through of my <a href="http://vanseodesign.com/blog/demo/html5-semantics/">demo</a> has helped make <a href="http://www.456bereastreet.com/archive/201103/html5_sectioning_elements_headings_and_document_outlines/">html5 sectioning elements</a> easier to understand and even better I hope it&#8217;s convinced you to create your own demo page. You&#8217;ll understand these tags much, much better through actual use than reading about what I&#8217;ve done.</p>
<p>Start with a trip through some of the html5 boilerplate templates that are readily available and beginning with one as a shell, develop what might be a typical web page in your workflow.</p>
<p>At first I fell back to using divs as I do now, just to get some kind of structure in place. I then began replacing some of those divs with the new elements and rearranging a few things here and there as I iterated the development of the page.</p>
<p>It really won&#8217;t take long to get used to he new elements, but the only way that will happen is if you take the time to start using them.</p>
<p>For those of you who have started developing with html5 how have you handled the issue of using too many or not enough headers? Have you found it easier to decide when it&#8217;s best to use div, section, and article as you&#8217;ve worked with them more? Are there specific issues that continue to arise for you that I haven&#8217;t mentioned here?</p>
<p><img src="http://www.vanseodesign.com/blog/?ak_action=api_record_view&amp;id=3152&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/EdkNyQm5B6t8j92MvS6_ccevuAQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/EdkNyQm5B6t8j92MvS6_ccevuAQ/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/EdkNyQm5B6t8j92MvS6_ccevuAQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/EdkNyQm5B6t8j92MvS6_ccevuAQ/1/di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/laIazdLufxM" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-using-html5-demo-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Develop Using HTML5: Demo Part 1</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-using-html5-demo-part-1/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-using-html5-demo-part-1/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 01:39:42 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[boilerplate]]></category>
		<category><![CDATA[content area]]></category>
		<category><![CDATA[demo page]]></category>
		<category><![CDATA[doctype html]]></category>
		<category><![CDATA[html lang]]></category>
		<category><![CDATA[meta charset]]></category>
		<category><![CDATA[quot]]></category>
		<category><![CDATA[semantic elements]]></category>
		<category><![CDATA[utf 8]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-using-html5-demo-part-1/</guid>
		<description><![CDATA[To really understand the new html5 semantic elements you need to use them in practice. To do that I&#8217;ve created a demo of a typical blog post page. I want to share that demo and do my best to explain why I chose to structure the page as I have. Before getting to the explanation [...]]]></description>
			<content:encoded><![CDATA[<p>To really understand the new <a href="http://www.vanseodesign.com/web-design/html5-semantic-elements/">html5 semantic elements</a> you need to use them in practice. To do that I&#8217;ve created a demo of a typical blog post page. I want to share that demo and do my best to explain why I chose to structure the page as I have.<br />
<span></span><br />
Before getting to the explanation please know that I&#8217;m still sorting some of this out for myself. I&#8217;m not saying the way I set up the demo page is the right way or even the best way. It&#8217;s simply the way that seemed most appropriate to me as I developed the page.</p>
<p>Even as I coded the demo I could think of other possible ways to structure it and at times felt a sense of confusion over which element made the most sense to use.</p>
<p>Here&#8217;s the <a href="http://vanseodesign.com/blog/demo/html5-semantics/">demo page</a>, which you may want to refer to as you&#8217;re reading through this post. All the images in the post are also links to the demo.</p>
<p><strong>Note:</strong> Because there&#8217;s a lot to cover I&#8217;ve split this post in two and will publish the second part on Thursday.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/demo-3.png" alt="Screenshot of the demo" width="465" height="416" /></a></p>
<h2>The Layout</h2>
<p>To keep things simple I opted to create a <a href="http://www.vanseodesign.com/css/2-column-layout-code/">2 column fixed-width and centered layout</a> that will likely look familiar. If you look at the demo or the image above you&#8217;ll note it includes the usual basics for a blog post.</p>
<ul>
<li>header</li>
<li>content area</li>
<li>sidebar</li>
<li>footer</li>
</ul>
<p><strong>Note:</strong> The image above is a cropped version of the demo page. I cut out most of the middle in order to make the image small enough to fit here.</p>
<h3>HTML5 Boilerplate</h3>
<p>There&#8217;s not a lot to see here with the basic shell. Naturally I&#8217;m using the new html5 doctype. I&#8217;ve also defined the language as English and also defined the <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/semantics.html#charset">character set</a>.</p>
<p>I&#8217;ve also included the html5shiv script for IE8 and below with a <a href="http://www.vanseodesign.com/css/conditional-comments/">conditional comment</a>.</p>
<pre>
<span>&lt;!DOCTYPE html&gt;</span>
<span>&lt;html lang=<span>&quot;en&quot;</span>&gt;</span>
<span>&lt;head&gt;</span>
<span>&lt;meta charset=<span>&quot;utf-8&quot;</span>&gt;</span>
<span>&lt;meta name=<span>&quot;description&quot;</span> content=<span>&quot;Demo for a typical blog post coded using new html5 semantic elements&quot;</span> /&gt;</span>
<span>&lt;title&gt;</span>HTML5 Structural Semantics<span>&lt;/title&gt;</span>
<span>&lt; link rel=<span>&quot;stylesheet&quot;</span> href=<span>&quot;style.css&quot;</span> &gt;</span>
<span><span>&lt;!--[if lt IE 9]&gt;</span>
	<span>&lt;script src=&quot;http://html5shiv.googlecode.com/svn/trunk/html5.js&quot;&gt;</span><span>&lt;/script&gt;</span>
<span>&lt;![endif]--&gt;</span></span>
<span>&lt;/head&gt;</span>
<span>&lt;body&gt;</span>
<span>&lt;/body&gt;</span>
<span>&lt;/html&gt;</span>
</pre>
<p>I purposely kept the shell simple since I was mainly concerned with the new structural elements. There&#8217;s more you might want to and probably should include and I&#8217;ll refer you to the <a href="http://html5boilerplate.com/">html5 boilerplate</a> site for more and better information.</p>
<h3>Additional Resources</h3>
<p>Below are a few sources for html5 boilerplate code.</p>
<ul>
<li><a href="https://github.com/vladocar/HTML5-Mini-Template">HTML5 Mini Template</a></li>
<li><a href="https://github.com/paulirish/html5-boilerplate/wiki/The-markup">html5 boilerplate</a></li>
<li><a href="http://net.tutsplus.com/tutorials/html-css-techniques/the-official-guide-to-html5-boilerplate/">The Official Guide to HTML5 Boilerplate </a></li>
<li><a href="http://blogs.sitepoint.com/a-basic-html5-template/">A Basic HTML5 Template</a></li>
</ul>
<h3>The Presentation</h3>
<p>Most of the css was added in a quick and dirty manner. It&#8217;s there to make the demo presentable and also to test how the page looks in older versions of Internet Explorer. It&#8217;s hardly the best code or all that interesting where this demo is concerned.</p>
<p>The one bit that&#8217;s most relevant for our current purpose is at the top of the page.</p>
<pre>
<span>section, article, header, footer, nav, aside, hgroup {</span>
	<span>display</span><span>:</span><span> block</span><span>;</span>
<span>}</span>
</pre>
<p>If you remember we needed this code since our new elements have no default styles in some browsers.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/ie9-on-xp.png" alt="The demo as viewed in Internet Explorer 9 On Windows Vista" width="465" height="349" /></a></p>
<caption>Above: The demo as viewed in Internet Explorer 9 on Windows Vista</caption>
<h2>The High Level HTML5 Structure</h2>
<p>Let&#8217;s get to the good stuff. I wrapped everything inside the body with a wrapper div, which I used to set the width of the page and center it.</p>
<p>I chose to stick with a div here instead of using a section because the container is only meant for presentation. A section tag would indicate the content inside is related. Since different kinds of content will be inside, a div seems most appropriate.</p>
<pre>
<span>&lt;div id=<span>&quot;wrapper&quot;</span>&gt;</span>
	everything else here
<span>&lt;/div&gt;</span>
</pre>
<p>Inside the wrapper the high level page structure is as follows:</p>
<pre>
<span>&lt;div id=<span>&quot;wrapper&quot;</span>&gt;</span>
	<span>&lt;header id=<span>&quot;masthead&quot;</span> role=<span>&quot;banner&quot;</span>&gt;</span><span>&lt;/header&gt;</span>
	<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span><span>&lt;/div&gt;</span>
	<span>&lt;aside class=<span>&quot;primary&quot;</span>&gt;</span><span>&lt;/aside&gt;</span>
	<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span><span>&lt;/div&gt;</span>
	<span>&lt;footer class=<span>&quot;contentinfo&quot;</span> role=<span>&quot;contentinfo&quot;</span>&gt;</span><span>&lt;/footer&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>The <a href="http://www.vanseodesign.com/web-design/structures-patterns-textures/">structure</a> contains 3 of the new elements, probably where you&#8217;d expect them to be. The header element contains the logo, tagline, and navigation. The aside contains the rss and category information, and the footer contains the designed by credit and copyright.</p>
<p>The information just above the copyright may seem to make sense as a footer or at least a section, but if you look at the content, it isn&#8217;t really related. There are 3 distinct sections of content, hence the use of a div to enclose it all.</p>
<p>The post itself, the meta information, and the comments are all inside a content div. I&#8217;ll show the details next time, but directly inside this div is an article tag which also wraps everything</p>
<pre>
<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
	<span>&lt;article class=<span>&quot;post&quot;</span>&gt;</span>
		post, meta, comments here
	<span>&lt;/article&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>I could have left out the content div and moved it&#8217;s styles to the article, but I included both to allow for the possibility of other content like a trail of breadcrumb links. Those links might fall inside the div, but wouldn&#8217;t be part of the article.</p>
<p>You may have noticed that both the header and footer contain the role attribute. <a href="http://www.w3.org/TR/wai-aria/roles">Roles exist for assisted technologies</a>. While I&#8217;ve included roles in the demo I&#8217;ll hold off talking about them in this post and save the talk for another post where I can give it the attention it deserves.</p>
<p>Let&#8217;s continue by looking inside the 5 structural containers inside our wrapper div.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/demo-header.png" alt="The header of the demo" width="465" height="57" /></a></p>
<h2>Header</h2>
<p>The header element is fairly easy to understand and use. What you&#8217;ve been marking up till now as div id=&#8221;header&#8221; (or similar) you&#8217;ll now markup with the header element instead.</p>
<p>One adjustment with headers is that you can and likely will use more than one header in a document. (We&#8217;ll see this when we explore the other containers). Because we can have multiple headers it makes sense to give this one an id or class.</p>
<pre>
	<span>&lt;header id=<span>&quot;masthead&quot;</span> role=<span>&quot;banner&quot;</span>&gt;</span>
		<span>&lt;div class=<span>&quot;bar&quot;</span>&gt;</span><span>&lt;/div&gt;</span>
		<span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;img id=<span>&quot;logo&quot;</span> src=<span>&quot;&quot;</span> alt=<span>&quot;&quot;</span> /&gt;</span><span>&lt;/a&gt;</span>
		<span>&lt;hgroup&gt;</span>
			<span>&lt;h1&gt;</span>html5 Web Design<span>&lt;/h1&gt;</span>
			<span>&lt;h2&gt;</span>Building your website for the future<span>&lt;/h2&gt;</span>
		<span>&lt;/hgroup&gt;</span>
		<span>&lt;nav role=<span>&quot;navigation&quot;</span>&gt;</span>
			<span>&lt;ul id=<span>&quot;main-nav&quot;</span>&gt;</span>
				<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span> title=<span>&quot;&quot;</span>&gt;</span>Home<span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
				<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span> title=<span>&quot;&quot;</span>&gt;</span>About<span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
				<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span> title=<span>&quot;&quot;</span>&gt;</span>Blog<span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
				<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span> title=<span>&quot;&quot;</span>&gt;</span>Contact<span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
			<span>&lt;/ul&gt;</span>
		<span>&lt;/nav&gt;</span>
	<span>&lt;/header&gt;</span>
</pre>
<p>Immediately inside is a div, which I used to create the thin black bar across the top. Since its only function is presentational a div seemed most appropriate. Next I&#8217;ve added a logo, which should look exactly as you&#8217;d expect.</p>
<p>I included both the site title and tagline as headings inside an hgroup. Currently I wouldn&#8217;t use headings for either, but I wanted to give hgroup a spin. In the future I think this will be the common practice.</p>
<p>Our <a href="http://www.vanseodesign.com/css/simple-navigation-bar-with-css-and-xhtml/">main navigation</a> is inside the header and as you would expect it&#8217;s marked up using the new nav element. Again I&#8217;ve added a role. Otherwise it should look as you would expect main navigation to be coded.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/demo-aside.png" alt="The demo Sidebar" width="465" height="279" /></a></p>
<h2>Aside</h2>
<p>Let&#8217;s move to the right and the aside before getting to the content as the aside is a bit simpler.</p>
<p>Remember an aside is meant for tangential content. While the content here is certainly useful it could easily be removed without affecting the main content on the page.</p>
<p>The class name is arbitrary. There are other asides in the document and I decided this was the primary aside, hence the choice.</p>
<pre>
	<span>&lt;aside class=<span>&quot;primary&quot;</span>&gt;</span>
		<span>&lt;section class=<span>&quot;rss&quot;</span>&gt;</span>
			<span>&lt;a href=<span>&quot;&quot;</span>&gt;</span><span>&lt;img src=<span>&quot;images/rss-24x24.png&quot;</span> alt=<span>&quot;&quot;</span> /&gt;</span> Subscribe<span>&lt;/a&gt;</span>
		<span>&lt;/section&gt;</span>
		<span>&lt;nav&gt;</span>
			<span>&lt;h3&gt;</span>Categories<span>&lt;/h3&gt;</span>
			<span>&lt;ul&gt;</span>
				<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span>CSS<span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
				<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span>Web Design<span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
				<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span>WordPress<span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
				<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span>Blogging<span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
				<span>&lt;li&gt;</span><span>&lt;a href=<span>&quot;&quot;</span>&gt;</span>SEO<span>&lt;/a&gt;</span><span>&lt;/li&gt;</span>
			<span>&lt;/ul&gt;</span>
		<span>&lt;/nav&gt;</span>
	<span>&lt;/aside&gt;</span>
</pre>
<p>Finally a section tag. Here we simply have some text and an image wrapped in a link that points to the feed. Clearly related stuff.</p>
<p>On a real page you might also include a subscriber count and an option to subscribe via email. Both would be related to the link we have here so again a section is the most appropriate.</p>
<p>Below the rss section is another nav element. Nav isn&#8217;t meant for every occurrence of a group of links, but because this is sub-navigation for the blog that would likely be included on multiple pages, it made sense to code it with the nav element.</p>
<p>You&#8217;ll notice the h3 inside the nav. Admittedly I wasn&#8217;t consistent in my use of hx tags in this demo. In some places I use h1s relying on an <a href="http://www.vanseodesign.com/web-design/html5-content-models/">outline algorithm</a> I know doesn&#8217;t work in most browsers and in other places I kept track of the <a href="http://www.vanseodesign.com/web-design/visual-hierarchy/">hierarchy</a> myself.</p>
<p>I also didn&#8217;t include a header inside. I could have wrapped the h3 like so.</p>
<pre>
<span>&lt;header&gt;</span>
	<span>&lt;h3&gt;</span>Categories<span>&lt;/h3&gt;</span>
<span>&lt;/header&gt;</span>
</pre>
<p>This was a gut call. As html5 becomes the de facto way to develop pages and sites I suspect most every hx tag will fall inside a header element. However it was hard to see any advantage to adding it here.</p>
<p>This is one of those places where I can&#8217;t say whether or not what I&#8217;ve done is the best practice. I think the html5 spec wants me to use header tags here, but again I didn&#8217;t see an advantage.</p>
<p>Let&#8217;s stop here and continue next time with the main content div.</p>
<p><a href="http://vanseodesign.com/blog/demo/html5-semantics/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/ie8-on-xp.png" alt="The demo as viewed in Internet Explorer 8 On Windows XP" width="465" height="349" /></a></p>
<caption>Above: The demo as viewed in Internet Explorer 8 on Windows XP</caption>
<h2>Summary</h2>
<p>Like I said at the top you really need to use the new elements in practice to understand them. Their definitions are relatively easy to grasp, but once coding you&#8217;ll be faced with some less than clear choices.</p>
<p>Over time I suspect we&#8217;ll have plenty of best practices to guide us. At the moment we&#8217;re mostly on our own to figure out <a href="http://oli.jp/2009/html5-structure1/">when to use div, section, and article</a> or whether or not we should include a header inside a section.</p>
<p>I&#8217;ll pick up where we left off next time, though of course <a href="http://vanseodesign.com/blog/demo/html5-semantics/">the demo</a> will still be there if you want to poke through my code and see how I set the page up. Again I&#8217;ll remind you my code isn&#8217;t necessarily right or the best. It&#8217;s simply what made the most sense to me as I developed the demo page.</p>
<p>Like many I&#8217;m still working much of this out for myself. Hopefully sharing my thoughts will help make it easier for you to work it out.</p>
<p><img src="http://www.vanseodesign.com/blog/?ak_action=api_record_view&amp;id=3130&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/XQcJoq-mqcXzEBNnIDErqTpPuvM/0/da"><img src="http://feedads.g.doubleclick.net/~a/XQcJoq-mqcXzEBNnIDErqTpPuvM/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/XQcJoq-mqcXzEBNnIDErqTpPuvM/1/da"><img src="http://feedads.g.doubleclick.net/~a/XQcJoq-mqcXzEBNnIDErqTpPuvM/1/di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/_Pr6Qwn8sSc" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-using-html5-demo-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding HTML5 Content Models</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/understanding-html5-content-models/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/understanding-html5-content-models/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 01:38:24 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[content models]]></category>
		<category><![CDATA[gt design]]></category>
		<category><![CDATA[gt info]]></category>
		<category><![CDATA[gt web]]></category>
		<category><![CDATA[hierarchical outline]]></category>
		<category><![CDATA[layout grids]]></category>
		<category><![CDATA[level elements]]></category>
		<category><![CDATA[semantic elements]]></category>
		<category><![CDATA[web design layout]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/understanding-html5-content-models/</guid>
		<description><![CDATA[Earlier this week we looked at the new text-level and structural semantic elements html5 provides. Today I want to continue and talk about content models in html5, specifically the new outline algorithm for creating hierarchy. Once again much of the content below comes to me via Jeremy Keith&#8217;s book HTML5 for Web Designers, which I [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this week we looked at the new text-level and structural <a href="http://www.vanseodesign.com/web-design/html5-semantic-elements/">semantic elements html5 provides</a>. Today I want to continue and talk about content models in html5, specifically the new outline algorithm for creating hierarchy.<br />
<span></span><br />
Once again much of the content below comes to me via <a href="http://adactio.com/journal/">Jeremy Keith</a>&#8217;s book <a href="http://www.abookapart.com/products/html5-for-web-designers">HTML5 for Web Designers</a>, which I highly recommend.</p>
<p>Unfortunately some of what we&#8217;ll look at below isn&#8217;t yet supported by browsers. Some of it will be, but not all. Still I think what&#8217;s here is important to understand with an eye toward the future.</p>
<p><a href="http://www.w3.org/TR/html5/content-models.html"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/brcontent-venn.png" alt="Venn diagram of html5 content models" width="465" height="262" /></a></p>
<h2>Content Models</h2>
<p>Before html5 we had two categories of elements, inline and block. With html5 we now have a more fine-grained set of categories with their own <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/content-models.html">content models</a>.</p>
<ul>
<li><strong>Text-level semantics</strong> &mdash; what were previously inline tags</li>
<li><strong>Grouping content</strong> &mdash; block level elements like paragraphs, lists, and divs</li>
<li><strong>Forms</strong> &mdash; everything inside form tags</li>
<li><strong>Embedded content</strong> &mdash; images, video, audio, and canvas</li>
<li><strong>Sectioning content</strong> &mdash; the new structural tags described in my previous post</li>
</ul>
<p>Currently to create a <a href="http://owl.english.purdue.edu/owl/resource/544/01/">hierarchical outline</a> of our content we use a set of h1&ndash;h6 tags. They work for the most part, but can break down at times. Consider the following:</p>
<pre>
<span>&lt;h1&gt;</span>Web Design<span>&lt;/h1&gt;</span>
	<span>&lt;p&gt;</span>Some general info about web design<span>&lt;/p&gt;</span>
	<span>&lt;h2&gt;</span>Layout<span>&lt;/h2&gt;</span>
	<span>&lt;p&gt;</span>Info about layouts<span>&lt;/p&gt;</span>
		<span>&lt;h3&gt;</span>Grids<span>&lt;/h3&gt;</span>
		<span>&lt;p&gt;</span>Info about grids<span>&lt;/p&gt;</span>
	<span>&lt;h2&gt;</span>Typography<span>&lt;/h2&gt;</span>
	<span>&lt;p&gt;</span>Info about typography<span>&lt;/p&gt;</span>
	<span>&lt;h2&gt;</span>Color<span>&lt;/h2&gt;</span>
	<span>&lt;p&gt;</span>Info about color<span>&lt;/p&gt;</span>
	<span>&lt;h2&gt;</span>Design Principles<span>&lt;/h2&gt;</span>
	<span>&lt;ul&gt;</span>
		<span>&lt;li&gt;</span>List of<span>&lt;/lI&gt;</span>
		<span>&lt;li&gt;</span>several different<span>&lt;/lI&gt;</span>
		<span>&lt;li&gt;</span>design principles<span>&lt;/lI&gt;</span>
	<span>&lt;/ul&gt;</span>
<span>&lt;p&gt;</span>Where in the outline does this paragraph belong?<span>&lt;/p&gt;</span>
</pre>
<p>The above would produce the following outline based on the headings.</p>
<ul>
<li>web design
<ul>
<li>layout
<ul>
<li>grids</li>
</ul>
</li>
<li>typography</li>
<li>color</li>
<li>design principles</li>
</ul>
</li>
</ul>
<p>In general each paragraph below a heading belongs under that heading in the outline in the hierarchy, but do they have to?</p>
<p>Where in the outline does the very last paragraph belong? Is it under the <a href="http://www.vanseodesign.com/web-design/why-understand-design-principles/">Design Principles</a> or does it belong under Web Design?</p>
<p>You can tell my intention based on the indentation, but a <a href="http://www.vanseodesign.com/web-design/microformats-what-how-why/">machine</a> isn&#8217;t going to see that with the whitespace stripped and there&#8217;s no reason the code needed to be indented the way it is above.</p>
<p>Visually that last paragraph will look just like the one above it as well. Reading you wouldn&#8217;t really know which section it belongs to.</p>
<p>HTML5 helps solve the problem above.</p>
<p><a href="http://www.w3.org/html/logo/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/html-sticker.png" alt="I've seen the future. It's in my browser. HTML5" width="465" height="233" /></a></p>
<h2>Sectioning Content Model</h2>
<p>The first tool html5 provides is the section tag we discussed last time. Using the section element we can rewrite the above as</p>
<pre>
<span>&lt;h1&gt;</span>Web Design<span>&lt;/h1&gt;</span>
	<span>&lt;p&gt;</span>Some general info about web design<span>&lt;/p&gt;</span>
	<span>&lt;section&gt;</span>
		<span>&lt;h2&gt;</span>Layout<span>&lt;/h2&gt;</span>
		<span>&lt;p&gt;</span>Info about layouts<span>&lt;/p&gt;</span>
			<span>&lt;h3&gt;</span>Grids<span>&lt;/h3&gt;</span>
			<span>&lt;p&gt;</span>Info about grids<span>&lt;/p&gt;</span>
		<span>&lt;h2&gt;</span>Typography<span>&lt;/h2&gt;</span>
		<span>&lt;p&gt;</span>Info about typography<span>&lt;/p&gt;</span>
		<span>&lt;h2&gt;</span>Color<span>&lt;/h2&gt;</span>
		<span>&lt;p&gt;</span>Info about color<span>&lt;/p&gt;</span>
		<span>&lt;h2&gt;</span>Design Principles<span>&lt;/h2&gt;</span>
		<span>&lt;ul&gt;</span>
			<span>&lt;li&gt;</span>List of<span>&lt;/lI&gt;</span>
			<span>&lt;li&gt;</span>several different<span>&lt;/lI&gt;</span>
			<span>&lt;li&gt;</span>design principles<span>&lt;/lI&gt;</span>
		<span>&lt;/ul&gt;</span>
	<span>&lt;/section&gt;</span>
<span>&lt;p&gt;</span>Where in the outline does this paragraph belong?<span>&lt;/p&gt;</span>
</pre>
<p>Once again the outline produced is the same as we saw above, but now it&#8217;s much clearer where the last paragraph belongs. We can do better though. Let&#8217;s mix in the header element and better define the different sections of the document.</p>
<pre>
<span>&lt;h1&gt;</span>Web Design<span>&lt;/h1&gt;</span>
	<span>&lt;p&gt;</span>Some general info about web design<span>&lt;/p&gt;</span>
	<span>&lt;section&gt;</span>
		<span>&lt;header&gt;</span>
			<span>&lt;h2&gt;</span>Layout<span>&lt;/h2&gt;</span>
		<span>&lt;/header&gt;</span>
		<span>&lt;p&gt;</span>Info about layouts<span>&lt;/p&gt;</span>
		<span>&lt;section&gt;</span>
			<span>&lt;header&gt;</span>
				<span>&lt;h3&gt;</span>Grids<span>&lt;/h3&gt;</span>
			<span>&lt;/header&gt;</span>
			<span>&lt;p&gt;</span>Info about grids<span>&lt;/p&gt;</span>
		<span>&lt;/section&gt;</span>
	<span>&lt;/section&gt;</span>
	<span>&lt;section&gt;</span>
		<span>&lt;header&gt;</span>
			<span>&lt;h2&gt;</span>Typography<span>&lt;/h2&gt;</span>
		<span>&lt;/header&gt;</span>
		<span>&lt;p&gt;</span>Info about typography<span>&lt;/p&gt;</span>
	<span>&lt;/section&gt;</span>
	<span>&lt;section&gt;</span>
		<span>&lt;header&gt;</span>
			<span>&lt;h2&gt;</span>Color<span>&lt;/h2&gt;</span>
		<span>&lt;/header&gt;</span>
		<span>&lt;p&gt;</span>Info about color<span>&lt;/p&gt;</span>
	<span>&lt;/section&gt;</span>
	<span>&lt;section&gt;</span>
		<span>&lt;header&gt;</span>
			<span>&lt;h2&gt;</span>Design Principles<span>&lt;/h2&gt;</span>
		<span>&lt;/header&gt;</span>
		<span>&lt;ul&gt;</span>
			<span>&lt;li&gt;</span>List of<span>&lt;/lI&gt;</span>
			<span>&lt;li&gt;</span>several different<span>&lt;/lI&gt;</span>
			<span>&lt;li&gt;</span>design principles<span>&lt;/lI&gt;</span>
		<span>&lt;/ul&gt;</span>
	<span>&lt;/section&gt;</span>
<span>&lt;p&gt;</span>Where in the outline does this paragraph belong?<span>&lt;/p&gt;</span>
</pre>
<p>Once again the above html produces the same outline. So far not much is really new other than the addition of some new tags. We could have done the same thing by using divs instead of section and header.</p>
<p>So where&#8217;s the new stuff?</p>
<p><a href="http://www.flickr.com/photos/brook/11602962/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/broutline-2.jpg" alt="CSS outline in Tinderbox application" width="465" height="338" /></a></p>
<h2>HTML5 Outline Algorithm</h2>
<p>In html5 each <a href="http://www.456bereastreet.com/archive/201103/html5_sectioning_elements_headings_and_document_outlines/">sectioning element</a> has its own self-contained outline. What that means is we can start each section with an h1 tag and the algorithm will figure out the overall outline.</p>
<pre>
<span>&lt;h1&gt;</span>Web Design<span>&lt;/h1&gt;</span>
	<span>&lt;p&gt;</span>Some general info about web design<span>&lt;/p&gt;</span>
	<span>&lt;section&gt;</span>
		<span>&lt;header&gt;</span>
			<span>&lt;h1&gt;</span>Layout<span>&lt;/h1&gt;</span>
		<span>&lt;/header&gt;</span>
		<span>&lt;p&gt;</span>Info about layouts<span>&lt;/p&gt;</span>
		<span>&lt;section&gt;</span>
			<span>&lt;header&gt;</span>
				<span>&lt;h1&gt;</span>Grids<span>&lt;/h1&gt;</span>
			<span>&lt;/header&gt;</span>
			<span>&lt;p&gt;</span>Info about grids<span>&lt;/p&gt;</span>
		<span>&lt;/section&gt;</span>
	<span>&lt;/section&gt;</span>
	<span>&lt;section&gt;</span>
		<span>&lt;header&gt;</span>
			<span>&lt;h1&gt;</span>Typography<span>&lt;/h1&gt;</span>
		<span>&lt;/header&gt;</span>
		<span>&lt;p&gt;</span>Info about typography<span>&lt;/p&gt;</span>
	<span>&lt;/section&gt;</span>
	<span>&lt;section&gt;</span>
		<span>&lt;header&gt;</span>
			<span>&lt;h1&gt;</span>Color<span>&lt;/h1&gt;</span>
		<span>&lt;/header&gt;</span>
		<span>&lt;p&gt;</span>Info about color<span>&lt;/p&gt;</span>
	<span>&lt;/section&gt;</span>
	<span>&lt;section&gt;</span>
		<span>&lt;header&gt;</span>
			<span>&lt;h1&gt;</span>Design Principles<span>&lt;/h1&gt;</span>
		<span>&lt;/header&gt;</span>
		<span>&lt;ul&gt;</span>
			<span>&lt;li&gt;</span>List of<span>&lt;/lI&gt;</span>
			<span>&lt;li&gt;</span>several different<span>&lt;/lI&gt;</span>
			<span>&lt;li&gt;</span>design principles<span>&lt;/lI&gt;</span>
		<span>&lt;/ul&gt;</span>
	<span>&lt;/section&gt;</span>
<span>&lt;p&gt;</span>Where in the outline does this paragraph belong?<span>&lt;/p&gt;</span>
</pre>
<p>Believe it or not the above html where every heading is an h1 still produces the same <a href="https://developer.mozilla.org/en/Sections_and_Outlines_of_an_HTML5_document">outline in html5</a>.</p>
<ul>
<li>web design
<ul>
<li>layout
<ul>
<li>grids</li>
</ul>
</li>
<li>typography</li>
<li>color</li>
<li>design principles</li>
</ul>
</li>
</ul>
<p>Under html 4 the outline would be</p>
<ul>
<li>web design</li>
<li>layout</li>
<li>grids</li>
<li>typography</li>
<li>color</li>
<li>design principles</li>
</ul>
<p>Quite a difference. It might seem somewhat strange to have every heading be an h1 tag, but it does have advantages. You won&#8217;t have to keep track of your overall <a href="http://www.vanseodesign.com/web-design/counterpart-and-counterpoint-in-typographic-hierarchy/">hierarchy</a>, only the hierarchy within a section.</p>
<p>Maybe not such a big deal with a single document, but it does allow our content to be more modular and portable, which will get to momentarily.</p>
<h3>Other Sectioning Elements</h3>
<p>Above I mentioned that the <a href="http://html5doctor.com/document-outlines/">sectioning content model</a> includes all the structural tags we talked about last time. It&#8217;s not only the section tag that creates its own self-contained outline.</p>
<p>Tags like aside, article, and nav also do the same.</p>
<p>While it wouldn&#8217;t be appropriate had I used article tags instead of section tags in the above code the same outline would have been produced.</p>
<p><a href="http://www.flickr.com/photos/jacreative/148129344/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2010/09/lego-community.jpg" alt="group of lego people" width="465" height="310" /></a></p>
<h2>The hgroup Element</h2>
<p>Sometimes you may want to use headings so you can better show and style <a href="http://www.vanseodesign.com/web-design/visual-hierarchy/">visual hierarchy</a>, but you don&#8217;t want the heading to be part of the document outline.</p>
<p>hgroup allows us to do just that. For example say you have the following markup:</p>
<pre>
<span>&lt;hgroup&gt;</span>
	<span>&lt;h1&gt;</span>Main heading<span>&lt;/h1&gt;</span>
	<span>&lt;h2&gt;</span>Tagline<span>&lt;/h2&gt;</span>
<span>&lt;/hgroup&gt;</span>
</pre>
<p>Only the h1 above would be included in document outline. The h2 wouldn&#8217;t be included. Only the first heading, regardless of how many are there would be included in the outline.</p>
<p>The hgroup element can only contain h1&ndash;h6 tags and it&#8217;s meant to be used for subtitles, alternative titles, and tag lines.</p>
<p>Do we need hgroup? The above could have been coded as:</p>
<pre>
<span>&lt;h1&gt;</span>Main heading<span>&lt;/h1&gt;</span>
<span>&lt;p class=<span>&quot;tagline&quot;</span>&gt;</span>Tagline<span>&lt;p&gt;</span>
</pre>
<p>This would produce the same outline and allow for the same visual styles, however the hgroup probably adds more <a href="http://www.vanseodesign.com/web-design/semantic-html/">semantic meaning</a> and certainly uses a bit less code. </p>
<p>In addition to using hgroup to hide some headings from the document outline there are a few elements that by default are invisible to the document element and are called sectioning roots.</p>
<ul>
<li>blockquote</li>
<li>fieldset</li>
<li>td</li>
</ul>
<p>Even if you use headings inside the above elements those headings won&#8217;t be part of the document outline under html5.</p>
<p><a href="http://www.flickr.com/photos/billward/3399359836/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/modular-lego-building.png" alt="Modular lego building" width="465" height="220" /></a></p>
<h2>Modular Content</h2>
<p>The new outline algorithm helps us <a href="http://www.vanseodesign.com/marketing/content-strategy/">create content</a> that is more modular. The idea of not needing to keep track of your hierarchy might not seem like such a big deal until you consider what happens when you move a piece of content around.</p>
<p>For example typical of many blogs is to display the title and a short paragraph of several posts on the main blog page. In the individual posts the headings would be marked up with an h1. On the main blog page you might have an h1 for the page and then have each of the blog post titles as an h2.</p>
<p>With the new outline algorithm you can move the post titles back and forth with the same h1 heading and let the outline algorithm figure out the hierarchy.</p>
<p>This makes any section of content more portable as we can mix it in with other content without worrying that it might break the hierarchy of the page.</p>
<p>While you&#8217;ll probably never have need you can now also structure a document with more than 6 levels. Ultimately we can now create an infinite amount of levels using the same h1&ndash;h6 elements in nested sections.</p>
<h2>Scoped Styles</h2>
<p>A new problem is created in being able to move content around from document to document and that&#8217;s in the styles that get applied to that content.</p>
<p>Our modular content will inherit the styles of the parent document, which may not be what we want. html5 offers a solution with the boolean scoped attribute that can be applied to the style element as seen below.</p>
<pre>
<span>&lt;article&gt;</span>
	<span>&lt;style scoped&gt;</span>
		<span>h1 {</span>styles here<span>}</span>
	<span>&lt;/style&gt;</span>
	<span>&lt;h1&gt;</span><span>&lt;/h1&gt;</span>
	<span>&lt;p&gt;</span><span>&lt;/p&gt;</span>
<span>&lt;/article&gt;</span>
</pre>
<p>In the above code the h1 of our article will be the <a href="http://www.impressivewebs.com/scoped-styles-html5/">scoped styles</a> regardless of where the article is displayed. This allows us to move not only content, but the styles associated with that content easily.</p>
<p><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/02/browser-logos-30.jpg" alt=" Collage of browser logos" width="465" height="475" /></p>
<h2>Browser Support</h2>
<p>In order to use the new semantic elements we defined those elements in our stylesheet as display: block to ensure they won&#8217;t break our layouts. We should now add the hgroup element.</p>
<pre>
<span>section, article, header, footer, nav, aside, hgroup {</span>
	<span>display</span><span>:</span><span> block</span><span>;</span>
<span>}</span>
</pre>
<p>We&#8217;d of course need to create the element for IE as we did with the other elements or include the <a href="http://code.google.com/p/html5shiv/">html5shiv</a> script.</p>
<pre>
document.createElement('hgroup');
</pre>
<p>Now for the bad news. <a href="http://www.456bereastreet.com/archive/201106/on_using_h1_for_all_heading_levels_in_html5/">Browser support for the html5 outline algorithm is currently not good</a>.</p>
<p>However the good news is you don&#8217;t have to use an h1 to start each new section. You can continue to use h2 and h3 tags inside sections to produce the outline you want.</p>
<p>We&#8217;ll lose the portability benefits until browsers are supporting the new algorithm, but we can start preparing for when they do offer support.</p>
<p>For now it&#8217;s probably better to stick with using headings as you always have, though it is safe to enclose your headings in the new semantic elements.</p>
<p><a href="http://www.w3.org/html/logo/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/html5-logo.png" alt="html5 logo" width="465" height="500" /></a></p>
<h2>Summary</h2>
<p>HTML5&#8217;s sectioning content model gives us greater control over the <a href="http://www.vanseodesign.com/web-design/dominance/">hierarchy of our documents</a>. The new outline algorithm provides for an unlimited number of heading levels and helps make our content more modular and portable.</p>
<p>At the moment there&#8217;s limited browser support the the html5 outline algorithm, but we can still prepare for it while using h1&ndash;h6 tags as we do now.</p>
<p>We won&#8217;t be able to take advantage of some of the benefits the new outline algorithm will gives us, but we can prepare our documents for when browser support is more robust.</p>
<p>It will probably feel a little strange to markup a document with multiple h1 tags and leave it to the browser to sort out the hierarchy, but hopefully you can see the advantages in such an approach.</p>
<p><img src="http://www.vanseodesign.com/blog/?ak_action=api_record_view&amp;id=3115&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/x8s3lnHcrDeWghUXqY3_o0CoEls/0/da"><img src="http://feedads.g.doubleclick.net/~a/x8s3lnHcrDeWghUXqY3_o0CoEls/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/x8s3lnHcrDeWghUXqY3_o0CoEls/1/da"><img src="http://feedads.g.doubleclick.net/~a/x8s3lnHcrDeWghUXqY3_o0CoEls/1/di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/bkK_H3FIfBA" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/understanding-html5-content-models/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning To Use HTML5 Semantic Elements</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/learning-to-use-html5-semantic-elements/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/learning-to-use-html5-semantic-elements/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 01:36:44 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[content model]]></category>
		<category><![CDATA[content models]]></category>
		<category><![CDATA[inline elements]]></category>
		<category><![CDATA[mark tag]]></category>
		<category><![CDATA[semantic elements]]></category>
		<category><![CDATA[semantic tags]]></category>
		<category><![CDATA[semantics]]></category>
		<category><![CDATA[time time]]></category>
		<category><![CDATA[web designers]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/learning-to-use-html5-semantic-elements/</guid>
		<description><![CDATA[HTML5 has several new layers, including a new set of semantic tags. While there is still some debate about whether or not we should be using and styling these tags I think at the very least we should start learning them. Over the last year or two I&#8217;ve read quite a number of posts talking [...]]]></description>
			<content:encoded><![CDATA[<p>HTML5 has several new layers, including a new set of <a href="http://www.vanseodesign.com/web-design/semantic-html/">semantic tags</a>. While there is still some debate about whether or not we should be using and styling these tags I think at the very least we should start learning them.<br />
<span></span><br />
Over the last year or two I&#8217;ve read quite a number of posts talking about html5 structural tags and most of them left me a bit confused about how to use them.</p>
<p>Recently I read <a href="http://adactio.com/journal/">Jeremy Keith</a>&#8217;s excellent book, <a href="http://www.abookapart.com/products/html5-for-web-designers">HTML5 for Web Designers</a> from A Book Apart and now feel like I have a better understanding of how these tags should work.</p>
<p>This post is a further attempt to better understand things for myself and hopefully pass on some of that understanding to you.</p>
<p>Today I want to run through each of the new tags and briefly explain what each is meant to be used for. I&#8217;ll keep the code itself light in this post.</p>
<p><strong>Note:</strong> Some of the elements below lead to a new content model for structuring documents. I&#8217;ll talk about more about content models on Thursday. Next week I&#8217;ll do my best to present some code for a typical blog post using these new html5 elements.</p>
<p><a href="http://www.w3.org/html/logo/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/html-sticker.png" alt="html5: I've seen the future and it's in my browser" width="465" height="233" /></a></p>
<h2>Text-Level Semantics Elements</h2>
<p>There are two types of semantic tags introduced by html5, text-level and structural. Text-level semantics fall into what are currently inline elements.</p>
<h3>Mark</h3>
<p>The mark tag is used to to highlight or reference a run of text due to it&#8217;s relevance in some other context. Highlighting words in a document that a visitor searched for is a good example.</p>
<p>The mark tag is doesn&#8217;t attach any importance to the text like strong or em tags do, but it&#8217;s more semantically <a href="http://www.vanseodesign.com/web-design/propositional-density/">meaningful</a> than the generic span tag.</p>
<p>It&#8217;s hard to think of many uses beyond searching, but I&#8217;m sure they exist. Perhaps you make a quote linkable and in the original document the text you quoted is highlighted in some way using the mark tag.</p>
<h3>Time</h3>
<p>Time as you would expect is used to markup temporal information. It can be used for dates, times, or combinations of the two.</p>
<pre>
<span>&lt;time datetime=<span>&quot;14:00&quot;</span>&gt;</span>2pm<span>&lt;/time&gt;</span>
<span>&lt;time datetime=<span>&quot;2011-07-14&quot;</span>&gt;</span>July 14th, 2011<span>&lt;/time&gt;</span>
<span>&lt;time datetime=<span>&quot;2011-07-14T14:00&quot;</span>&gt;</span>2pm on July 14th<span>&lt;/time&gt;</span>
</pre>
<p>The datetime attribute isn&#8217;t necessary, but if it&#8217;s not used it&#8217;s value needs to be shown to the visitor.</p>
<pre>
<span>&lt;time&gt;</span>2011-07-14<span>&lt;/time&gt;</span>
</pre>
<p>One obvious use for the time tag is with the <a href="http://microformats.org/wiki/hcalendar">hCalendar</a> <a href="http://www.vanseodesign.com/web-design/microformats-what-how-why/">microformat</a>. </p>
<pre>
<span>&lt;time class=<span>&quot;dtstart&quot;</span> datetime=<span>&quot;2011-07-14&quot;</span>&gt;</span> July 14th, 2011<span>&lt;/time&gt;</span>
</pre>
<p><a href="http://www.w3.org/html/logo/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/html5-semantics-2.jpg" alt="html5 semantics" width="465" height="348" /></a></p>
<h3>Meter</h3>
<p><a href="http://html5doctor.com/measure-up-with-the-meter-tag/">The meter tag</a> is used to markup measurements, specifically a scalar measurement within a known range.</p>
<pre>
<span>&lt;meter&gt;</span>1 of 10<span>&lt;/meter&gt;</span>
<span>&lt;meter&gt;</span>2 of 7<span>&lt;/meter&gt;</span>
</pre>
<p>It could also be used to represent a fractional value like disk usage or percentage of a specific population.</p>
<p>It doesn&#8217;t represent an absolute scalar value of arbitrary range like your height or weight, unless of course you&#8217;re reporting heights or weights within a known range of heights or weights.</p>
<p>There are 6 attributes you can use with the meter tag.</p>
<ul>
<li>value</li>
<li>min</li>
<li>max</li>
<li>high</li>
<li>low</li>
<li>optimum</li>
</ul>
<pre>
Your batting average is <span>&lt;meter value=<span>&quot;.340&quot;</span> min=<span>&quot;0&quot;</span> max=<span>&quot;1.000&quot;</span> low=<span>&quot;.215&quot;</span> high=<span>&quot;.367&quot;</span> optimum=<span>&quot;1.000&quot;</span>&gt;</span>.340<span>&lt;/meter&gt;</span>
</pre>
<p>Extra points for baseball fans who know what .340, .215, and .367 signify.</p>
<h3>Progress</h3>
<p>The <a href="http://blog.oldworld.fr/index.php?post/2011/07/The-HTML5-progress-element-in-Firefox">progress tag</a> is used to markup values in the process of changing</p>
<pre>
Your download is <span>&lt;progress&gt;</span>55%<span>&lt;/progress&gt;</span> complete
</pre>
<p>It has 3 attributes</p>
<ul>
<li>value</li>
<li>min</li>
<li>max</li>
</ul>
<p>By itself it&#8217;s probably not that interesting, however when combined with the DOM and some scripting it can be used to dynamically update progress values.</p>
<p><a href="http://www.flickr.com/photos/macinate/3702214427/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/03/framework-2a.jpg" alt="Sunset through the structural framwork of a house being constructed" width="465" height="288" /></a></p>
<h2>Structural Semantic Elements</h2>
<p>Structural elements are the block level elements we use to structure pages. Some of the tags below arose out of common web development usage for class names and ids.</p>
<h3>Section</h3>
<p>The section element represents a section of a document, typically one that includes a heading. It&#8217;s used to enclose a <a href="http://www.vanseodesign.com/web-design/web-design-harmony-concept-conveyance-and-theme/">thematic</a> grouping of content.</p>
<p>It&#8217;s similar to a div though it carries more semantic meaning since the content inside the section tags should be related. The key to choosing the semantic tag over a div is for the content to be related in some way.</p>
<h3>Header</h3>
<p>The header element represents the header of a section. It&#8217;s meant to be used as a container for a group of introductory content or set of navigational links.</p>
<p>While most websites currently have one header at the top of the page as a masthead, you can have multiple headers in a single html5 document. Usually you would use the header tag at the top of a document (as a masthead) or at the top of a section of content.</p>
<p>Getting used to multiple headers will probably be the most difficult adjustment.</p>
<h3>Footer</h3>
<p>Similar to the header, the footer element represents the footer for a section or document. Like the header tag there can be multiple footer tags in an html5 document.</p>
<p>A footer is more than content at the bottom. It should contain information about it&#8217;s containing element. Typical content you might include in a footer would be:</p>
<ul>
<li>Author information or bio</li>
<li>Copyright information</li>
<li>Links to related content</li>
</ul>
<p>The above aren&#8217;t the only things you could include. Any metadata for the section could go in the footer tag. Remember that the footer tag isn&#8217;t meant to describe position within a document, but rather describe the data within part of a document.</p>
<p><a href="http://clearice.deviantart.com/art/First-muro-try-177879431"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/01/html5-powered.jpg" alt="html5 powered" width="465" height="237" /></a></p>
<h3>Aside</h3>
<p>The aside element represents content that is tangentially related to the main text of a document. It aligns with what we think of as a sidebar.</p>
<p>As with the other structural tags its not about position within a document, but rather its relationship to the content. An aside doesn&#8217;t have to be to the right or left as we typically think of a sidebar. It could be at the top, the bottom, or even in the middle of a section of content.</p>
<p>If the information could be removed without reducing the <a href="http://www.vanseodesign.com/web-design/meaningful-design-aesthetics/">meaning of the overall content</a>, the information is a good candidate for an aside. Pull quotes are good examples. Advertising another.</p>
<h3>Nav</h3>
<p>The <a href="http://blog.echoenduring.com/2011/02/23/how-html5-changes-the-way-we-think-of-navigation/">nav element</a> represents a section of a document that links to other documents or to parts within the document itself. It&#8217;s a section of navigational links.</p>
<p>It&#8217;s intended for major navigational information like a sitewide <a href="http://www.vanseodesign.com/css/simple-navigation-bar-with-css-and-xhtml/">navigation bar</a> or a subsection menu. It&#8217;s important to realize that not every group of links belongs inside the nav element.</p>
<p>The nav tag should typically be placed inside the header element and again it&#8217;s meant for major navigational information.</p>
<h3>Article</h3>
<p>The article element represents a section of content that forms an independent part of a document or site. It represents a section of self-contained content.</p>
<p>Can the content be syndicated as an rss feed? If yes it&#8217;s probably an article. The article tags covers the same use case as the <a href="http://microformats.org/wiki/hatom">hAtom microformat</a>.</p>
<p>Potential sources for the article tag include:</p>
<ul>
<li>Blog post</li>
<li>News story</li>
<li>Comment</li>
<li>Review</li>
<li>Forum post</li>
</ul>
<p>If the time element is used inside an article it can include the boolean pubdate attribute, however only one pubdate can be used inside each article.</p>
<p>While not intuitive the article tag can be used for things like self-contained widgets such as stock tickers, calculators, and clocks. An article doesn&#8217;t specifically have to be textual content. It&#8217;s the self-contained part that&#8217;s most important.</p>
<p>One point about all the tags above is they aren&#8217;t meant to replace every div in your document. The tags should be used where semantically appropriate. Some of your divs will get replaced with these new tags, though not all will. It comes down to the content being enclosed and choosing the most semantically meaningful tag.</p>
<h2>The Difference Between Sections and Articles</h2>
<p>One of the things I&#8217;ve found confusing about these new structural tags is the difference between a section and an article and when to use each. The answer seems to be a matter of interpretation and in some places the tags seem interchangeable.</p>
<p>The two tags are similar. The difference is that an article is self-contained. It can stand on it&#8217;s own. A section isn&#8217;t. You can have multiple sections inside an article and you can have multiple articles inside a section. You can nest sections within sections and articles within articles.</p>
<p>Ultimately you have to decide which is the most semantically appropriate for a given situation and I imagine as html5 falls into greater use we&#8217;ll see debates about the &#8220;right&#8221; way to use each along with a lot of meaningless arguing with anyone who doesn&#8217;t agree with your &#8220;right&#8221; way.</p>
<p><strong>Note:</strong> I&#8217;ll have more to say about these 2 elements when we dive into some real code next week. Understanding their definitions is easy. Trying to decide when to use which in a document turns out to be a lot less easy.</p>
<p><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/02/browser-logos-30.jpg" alt="Collage of browser logos" width="465" height="475" /></p>
<h2>Browser Support</h2>
<p>Of course a big question is can and <a href="http://www.viget.com/inspire/html5-elements-irresponsible-choice-right-now/">should you use these tags now</a>. What kind of support exists in browsers for these new semantic tags?</p>
<p>Not all browsers are supporting these tags, however you can still use them today. Most browsers not named Internet Explorer allow you to create any element you like and let you style those elements how you want. They simply won&#8217;t give those tags any default styling.</p>
<p>If we consider all of the new structural tags they&#8217;re meant to act as block level elements so all we need to do is add the following:</p>
<pre>
<span>section, article, header, footer, nav, aside {</span>
	<span>display</span><span>:</span><span> block</span><span>;</span>
<span>}</span>
</pre>
<p>Doing the above will keep your <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-1/">layout</a> from breaking. You can then add any additional styles you&#8217;d like for your design. Browsers may not understand the additional semantic meaning of these tags, but so what.</p>
<p>Other machines that do understand the semantics will get that additional meaning and browsers will see these tags similar to how they see a div (without default styling).</p>
<p>IE8 and below won&#8217;t recognize the new tags. However IE will recognize new elements created in Javascript so we can create the new tags.</p>
<pre>
document.createElement('section');
</pre>
<p>You would do the same for each of the new elements or better use a <a href="http://www.vanseodesign.com/css/conditional-comments/">conditional comment</a> to link to Remy Sharp&#8217;s html5 shiv which will create them for you.</p>
<pre>
<span><span>&lt;!--[if IE]&gt;</span>
	<span>&lt;script src=&quot;http://html5shiv.googlecode.com/svn/trunk/html5.js&quot;&gt;</span><span>&lt;/script&gt;</span>
<span>&lt;![endif]--&gt;</span></span>
</pre>
<p><a href="http://www.modernizr.com/docs/#html5inie">Modernizer also include&#8217;s the html5 shiv</a> so if you use Modernizer you don&#8217;t need to link to the html5 shiv as well.</p>
<p>The above css and javascript will cover most everyone, though not people using IE6&ndash;8 with Javascript disabled. Generally speaking that&#8217;s a small % of people. Depending on the audience of your site it may not be an issue for you. There&#8217;s also a <a href="http://blog.whatwg.org/styling-ie-noscript">workaround for IE with scripting disabled</a>.</p>
<p>Know though that even those people will still see your content. They may not see the styles you apply to the tags and they may not get the extra semantics, but your content will still be there. whether or not that&#8217;s acceptable is up to you.</p>
<h2>Additional Resources</h2>
<p>There are many, many resources for html5 and more and more seem to appear every day. Here are a few I used while putting together this post.</p>
<ul>
<li><a href="http://www.abookapart.com/products/html5-for-web-designers">HTML5  For Web Designers</a></li>
<li><a href="http://developers.whatwg.org/">HTML5 from WHATWG</a></li>
<li><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html">Section tags from WHATWG</a></li>
<li><a href="http://diveintohtml5.org/semantics.html#new-elements">Dive Into HTML5</a></li>
<li><a href="http://www.alistapart.com/articles/semanticsinhtml5">Semantics in HTML 5</a></li>
<li><a href="http://html5doctor.com/">html5 Doctor</a></li>
<li><a href="http://www.w3.org/TR/html-markup/elements.html#elements">HTML Elements from W3C</a></li>
</ul>
<p><a href="http://www.w3.org/html/logo/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/html5-logo.png" alt="html5 logo" width="465" height="500" /></a></p>
<h2>Summary</h2>
<p>HTML5 adds a number of new layers to html, including a new set of semantically meaningful elements. We can categorize these new tags as being either text-level or structural.</p>
<p>The new tags are fairly easy to understand, though as we&#8217;ll see next week some become more confusing to use in practice</p>
<p>Browser support isn&#8217;t technically there in the sense of understanding the new semantics, but with a workaround or two we can safely <a href="http://www.smashingmagazine.com/2010/12/10/why-we-should-start-using-css3-and-html5-today/">use the new elements</a> for most, though not all cases, .</p>
<p>I&#8217;m leaning toward using these new semantic tags on my own projects, though I&#8217;ll probably hold off using them on most client sites without some additional workarounds for the moment.</p>
<p>How about you? Are you using html5 semantic elements and if so have you encountered any problems?</p>
<p><img src="http://www.vanseodesign.com/blog/?ak_action=api_record_view&amp;id=3109&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/6bVIoFCUg9PP2kNtDtHYL9XzzXE/0/da"><img src="http://feedads.g.doubleclick.net/~a/6bVIoFCUg9PP2kNtDtHYL9XzzXE/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/6bVIoFCUg9PP2kNtDtHYL9XzzXE/1/da"><img src="http://feedads.g.doubleclick.net/~a/6bVIoFCUg9PP2kNtDtHYL9XzzXE/1/di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/dP6yBwnq0eQ" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/learning-to-use-html5-semantic-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>8 New and amazing WordPress hacks</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/8-new-and-amazing-wordpress-hacks/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/8-new-and-amazing-wordpress-hacks/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 01:35:37 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[2s]]></category>
		<category><![CDATA[bitstream charter]]></category>
		<category><![CDATA[code snippets]]></category>
		<category><![CDATA[current user]]></category>
		<category><![CDATA[htaccess file]]></category>
		<category><![CDATA[maintenance function]]></category>
		<category><![CDATA[maintenance mode]]></category>
		<category><![CDATA[php source]]></category>
		<category><![CDATA[quot quot]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/8-new-and-amazing-wordpress-hacks/</guid>
		<description><![CDATA[Easily replace WordPress editor font Don&#8217;t like the default font used by WordPress editor? No problem, the following code will allow you to change it. Simply paste it to your theme functions.php file. You can define which font to use on line 5. add_action( &#039;admin_head-post.php&#039;, &#039;cwc_fix_html_editor_font&#039; ); add_action( &#039;admin_head-post-new.php&#039;, &#039;cwc_fix_html_editor_font&#039; ); function cwc_fix_html_editor_font() { ?&#62; [...]]]></description>
			<content:encoded><![CDATA[<h2>Easily replace WordPress editor font</h2>
<p>Don&#8217;t like the default font used by WordPress editor? No problem, the following code will allow you to change it. Simply paste it to your theme <code>functions.php</code> file. You can define which font to use on line 5.</p>
<pre>
add_action( &#039;admin_head-post.php&#039;, &#039;cwc_fix_html_editor_font&#039; );
add_action( &#039;admin_head-post-new.php&#039;, &#039;cwc_fix_html_editor_font&#039; );

function cwc_fix_html_editor_font() { ?&gt;

&lt;style type=&quot;text/css&quot;&gt;#editorcontainer #content, #wp_mce_fullscreen { font-family: Georgia, &quot;Times New Roman&quot;, &quot;Bitstream Charter&quot;, Times, serif; }&lt;/style&gt;
&lt;?php }
</pre>
<p><strong>Source: <a href="http://devpress.com/blog/fixing-wordpress-3-2s-html-editor-font/">http://devpress.com/blog/fixing-wordpress-3-2s-html-editor-font/</a></strong></p>
<h2>Quick and easy maintenance mode</h2>
<p>Sometimes, you need to put your blog on hold while performing some maintenance. Many plugins are allowing you to do so, but here is a simpler solution: Just paste the following snippet into your <code>functions.php</code> file and save it. Your blog is now unavailable to anyone except administrators. Don&#8217;t forget to remove the code when you&#8217;re done with maintenance!</p>
<pre>
function cwc_maintenance_mode() {
    if ( !current_user_can( &#039;edit_themes&#039; ) || !is_user_logged_in() ) {
        wp_die(&#039;Maintenance, please come back soon.&#039;);
    }
}
add_action(&#039;get_header&#039;, &#039;cwc_maintenance_mode&#039;);
</pre>
<p><strong>Source: <a href="http://skyje.com/2011/05/wordpress-code-snippets/">http://skyje.com/2011/05/wordpress-code-snippets/</a></strong></p>
<h2>Simpler login url</h2>
<p>Would you like to be able to use a simpler url like <code>http://website.com/login</code> to login to your WordPress dashboard? If yes, just read this recipe to learn how to implement it on your own blog.</p>
<p>Open your <code>.htaccess</code> file (located at the root of your WordPress install) and add the following code. <strong>Remember to backup your .htaccess file before editing it!</strong></p>
<pre>
RewriteRule ^login$ http://yoursite.com/wp-login.php [NC,L]
</pre>
<p><strong>Source: <a href="http://www.wprecipes.com/simpler-wordpress-login-url">http://www.wprecipes.com/simpler-wordpress-login-url</a></strong></p>
<h2>Disable theme switching</h2>
<p>When working with clients, it can be good to keep the control of what they can do to prevent possible problems. For example, disabling theme switching can be a good idea, especially if the site you built heavily rely on the theme. To do so, just paste the code below into the <code>functions.php</code> file of the theme. Once done, the client will not be able to switch themes anymore.</p>
<pre>
add_action(&#039;admin_init&#039;, &#039;cwc_lock_theme&#039;);
function cwc_lock_theme() {
	global $submenu, $userdata;
	get_currentuserinfo();
	if ($userdata-&gt;ID != 1) {
		unset($submenu[&#039;themes.php&#039;][5]);
		unset($submenu[&#039;themes.php&#039;][15]);
	}
}
</pre>
<p><strong>Source: <a href="http://sltaylor.co.uk/blog/disabling-wordpress-plugin-deactivation-theme-changing/">http://sltaylor.co.uk/blog/disabling-wordpress-plugin-deactivation-theme-changing/</a></strong></p>
<h2>Disable RSS feed</h2>
<p>By default, WordPress include the popular RSS functionnality, which is great for blogs. But if you&#8217;re using your WordPress install as a static site, having RSS feeds may become a bit confusing for your visitors.</p>
<p>This code will totally disable RSS feeds (As well as other formats) from your blog. Just paste the code into <code>functions.php</code>, and you&#8217;re done.</p>
<pre>
function cwc_disable_feed() {
	wp_die( __(&#039;No feed available,please visit our &lt;a href=&quot;&#039;. get_bloginfo(&#039;url&#039;) .&#039;&quot;&gt;homepage&lt;/a&gt;!&#039;) );
}
add_action(&#039;do_feed&#039;, &#039;cwc_disable_feed&#039;, 1);
add_action(&#039;do_feed_rdf&#039;, &#039;cwc_disable_feed&#039;, 1);
add_action(&#039;do_feed_rss&#039;, &#039;cwc_disable_feed&#039;, 1);
add_action(&#039;do_feed_rss2&#039;, &#039;cwc_disable_feed&#039;, 1);
add_action(&#039;do_feed_atom&#039;, &#039;cwc_disable_feed&#039;, 1);
</pre>
<p><strong>Source: <a href="http://wpengineer.com/287/disable-wordpress-feed/">http://wpengineer.com/287/disable-wordpress-feed/</a></strong></p>
<h2>Filter custom post types by author in admin</h2>
<p>Here is a function which adds a dropdown select control of users next to existing filters (by default, date). It also works in tandem with the built in author filtering which is available when you click on an author in on admin listing pages (by default on posts and pages).</p>
<p>As usual, the only thing you have to do to implement this code is to paste it into your <code>functions.php</code> file.</p>
<pre>
function cwc_restrict_manage_authors() {
        if (isset($_GET[&#039;post_type&#039;]) &amp;&amp; post_type_exists($_GET[&#039;post_type&#039;]) &amp;&amp; in_array(strtolower($_GET[&#039;post_type&#039;]), array(&#039;your_custom_post_types&#039;, &#039;here&#039;))) {
                wp_dropdown_users(array(
                        &#039;show_option_all&#039;       =&gt; &#039;Show all Authors&#039;,
                        &#039;show_option_none&#039;      =&gt; false,
                        &#039;name&#039;                  =&gt; &#039;author&#039;,
                        &#039;selected&#039;              =&gt; !empty($_GET[&#039;author&#039;]) ? $_GET[&#039;author&#039;] : 0,
                        &#039;include_selected&#039;      =&gt; false
                ));
        }
}
add_action(&#039;restrict_manage_posts&#039;, &#039;cwc_restrict_manage_authors&#039;);
</pre>
<p><strong>Source: <a href="http://forrst.com/posts/WordPress_Custom_Post_Types_Filter_by_Author_in-s9p">http://forrst.com/posts/WordPress_Custom_Post_Types_Filter_by_Author_in-s9p</a></strong></p>
<h2>Add post thumbnails to RSS feed</h2>
<p>This very cool piece of code will get the post thumbnail and automatically add it to your RSS feeds. Paste the code into <code>functions.php</code> and save the file. Don&#8217;t forget that you need to use a theme that supports <a href="http://codex.wordpress.org/Post_Thumbnails">post thumbnails</a> for this snippet to work.</p>
<pre>
function cwc_rss_post_thumbnail($content) {
    global $post;
    if(has_post_thumbnail($post-&gt;ID)) {
        $content = &#039;&lt;p&gt;&#039; . get_the_post_thumbnail($post-&gt;ID) .
        &#039;&lt;/p&gt;&#039; . get_the_content();
    }

    return $content;
}
add_filter(&#039;the_excerpt_rss&#039;, &#039;cwc_rss_post_thumbnail&#039;);
add_filter(&#039;the_content_feed&#039;, &#039;cwc_rss_post_thumbnail&#039;);
</pre>
<p><strong>Source: <a href="http://snipplr.com/view.php?codeview&amp;id=56180">http://snipplr.com/view.php?codeview&#038;id=56180</a></strong></p>
<h2>Remove WordPress admin bar</h2>
<p>Introduced in WordPress 3.X, the new &#8220;Admin bar&#8221; is an useful feature, but if you don&#8217;t like it, you can easily remove it. Just paste the following snippet into your <code>functions.php</code> file.</p>
<pre>
add_filter('show_admin_bar', '__return_false');
</pre>
<p><strong>Source: <a href="http://speckyboy.com/2011/03/01/how-to-remove-the-admin-bar-from-wordpress-3-1/">http://speckyboy.com/2011/03/01/how-to-remove-the-admin-bar-from-wordpress-3-1/</a></strong></p>
<p> <img src="http://feeds.feedburner.com/~r/Catswhocode/~4/cHtauD9twQY" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/Catswhocode">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/8-new-and-amazing-wordpress-hacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nobody&#8217;s Going to Help You, and That&#8217;s Awesome</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/nobodys-going-to-help-you-and-thats-awesome/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/nobodys-going-to-help-you-and-thats-awesome/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 01:35:03 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[funny]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[damn work]]></category>
		<category><![CDATA[generic concept]]></category>
		<category><![CDATA[marathon plan]]></category>
		<category><![CDATA[overnight success]]></category>
		<category><![CDATA[reading books]]></category>
		<category><![CDATA[self help books]]></category>
		<category><![CDATA[self improvement]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[time quality]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/nobodys-going-to-help-you-and-thats-awesome/</guid>
		<description><![CDATA[I&#8217;m not into self-help. I don&#8217;t buy self-help books, I don&#8217;t read productivity blogs, and I certainly don&#8217;t subscribe to self-proclaimed self-help guru newsletters. Reading someone else&#8217;s advice on the rather generic concept of helping yourself always struck me as a particularly misguided idea. Apparently I&#8217;m not the only person to reach this conclusion, either. [...]]]></description>
			<content:encoded><![CDATA[<p>
I&#8217;m not into <a href="http://en.wikipedia.org/wiki/Self-help">self-help</a>. I don&#8217;t buy self-help books, I don&#8217;t read productivity blogs, and I certainly don&#8217;t subscribe to <a href="http://www.stevepavlina.com/" rel="nofollow">self-proclaimed self-help guru</a> newsletters. Reading someone else&#8217;s advice on the rather generic concept of <i>helping yourself</i> always struck me as a particularly misguided idea. </p>
<p>
Apparently I&#8217;m not the only person to <a href="http://commonsenseatheism.com/?p=12651">reach this conclusion</a>, either.</p>
<blockquote><p>
I spent two years reading all the self-help books I could find. As of a year ago, I had read 340 self-help books. Because I’m insane.</p>
<p>
My conclusion from all that reading?</p>
<p>
<b>95% of self-help books are complete bullshit.</b>
</p></blockquote>
<p>
To be clear, I am all for <i>self-improvement</i>. Reading books, blogs, and newsletters by people who have accomplished great things is a fine way to research your own path in life. But these people, however famous and important they may be, <a href="http://sivers.org/up2you">are not going to help you</a>.</p>
<blockquote><p>
Unfortunately that&#8217;s not the answer he wanted. To him, my answer [that nobody was going to help him become successful] was really discouraging. To me, if I was receiving that answer from someone else, it would be really encouraging.</p>
<p>
I like being reminded that nobody&#8217;s going to help me &#8211; that it&#8217;s all up to me. <b>It puts my focus back on the things I can control &#8211; not waiting for outside circumstances.</b>
</p></blockquote>
<p>
Take it from <a href="http://productiveblog.tumblr.com/">The Ultimate Productivity Blog</a>:</p>
<p>
<a href="http://productiveblog.tumblr.com/"><img alt="Ultimate-productivity-blog" src="http://www.codinghorror.com/.a/6a0120a85dcdae970b01543407f4ef970c-800wi" border="0" /></a></p>
<p>
Reading self-help advice from other people, however well-intentioned, is no substitute for <b>getting your own damn work done</b>. The sooner you come to terms with this, the better off you&#8217;ll be.</p>
<p>
Get out there and do stuff <i>because you fundamentally enjoy it</i> and <i>because it makes you better</i>. As a writer, as an analyst, as a techie, whatever. Learn to <a href="http://headrush.typepad.com/creating_passionate_users/2006/03/dont_forget_squ.html">love practicing the fundamentals</a> and <b>do it better each time</b>. Over time, quality does lead to success, but you have to be patient. <i>Really</i> patient. Turns out, <a href="http://www.codinghorror.com/blog/2009/01/overnight-success-it-takes-years.html">&#8220;overnight&#8221; success takes years</a>. Maybe even decades. This is not a sprint, it&#8217;s a marathon. Plan accordingly.</p>
<p>
For example, I don&#8217;t care if anyone reads what I write here. I&#8217;m writing to satisfy myself first and foremost. If others read it and benefit from it, fantastic &#8212; that&#8217;s a welcome side effect. If I worry about <i>who</i> is reading, <i>why</i> they&#8217;re reading, or if <i>anyone</i> is even reading at all, I&#8217;d be too paralyzed to write! That&#8217;d be the least productive outcome of all.</p>
<p>
That&#8217;s not to say that <i>some</i> introspection about the nature of your work isn&#8217;t useful. It is. Even <a href="http://commonsenseatheism.com/?p=12651">the weary self-help student</a> I quoted above concluded that 5% of self-help advice surprisingly <i>wasn&#8217;t</i> bullshit. The one book he recommended without hesitation? <b><a href="http://www.amazon.com/59-Seconds-Little-Change-Borzoi/dp/B0057DCE7M/?tag=codihorr-20">59 Seconds: Think a Little, Change a Lot</a></b>.</p>
<p>
<a href="http://www.amazon.com/59-Seconds-Little-Change-Borzoi/dp/B0057DCE7M/?tag=codihorr-20"><img alt="59-seconds-book-cover" src="http://www.codinghorror.com/.a/6a0120a85dcdae970b014e8a27c433970d-800wi" border="0" /></a></p>
<p>
Despite my deep reservations about the genre, I ordered this book based on his recommendation and a number of credible references to it I noticed on the <a href="http://skeptics.stackexchange.com">Skeptic Stack Exchange</a>. </p>
<p>
Why does this self-help book work when so many others fail? In a word, <b>science</b>! The author goes out of his way to find actual published scientific research documenting specific ways we can make small changes in our behavior to produce better outcomes for ourselves and those around us. It&#8217;s powerful stuff, and the book is full of great, research backed insights like this one: </p>
<blockquote><p>
A group of participants were asked to select a negative experience. One group of participants were then asked to have a long chat with a supportive experimenter about the event, while a second group were invited to chat about a far more mundane topic &#8211; a typical day.</p>
<p>
Participants who had spent time talking about their traumatic event thought the chat had been helpful. However, the various questionnaires told a very different story. In reality the chat had no significant impact at all. They might just as well have been chatting about a typical day.</p>
<p>
In several studies, participants who have experienced a traumatic event have been encouraged to spend just a few minutes each day writing in a diary-type account of their deepest thoughts and feelings about it. For example, in one study participants who had just been made redundant were asked to reflect upon their deepest thoughts and feelings about their job loss, including how it had affected both their personal and professional lives. Although these types of exercises were  both speedy and simple, the results revealed a remarkable boost in their psychological and physical well-being, including a reduction in health problems and an increase in self-esteem and happiness.</p>
<p>
The results left psychologists with something of a mystery. <b>Why would talking about a traumatic experience have almost no effect but writing about it yield such significant benefits?</b> From a psychological perspective, talking and writing are very different. Talking can often be somewhat unstructured, disorganized, even chaotic. In contrast, writing encourages the creation of a story line and structure that help people make sense of what has happened and work towards a solution. In short, talking can add to a sense of confusion, but writing provides a more systematic, solution-based approach.
</p></blockquote>
<p>
Therefore, the real world change you would make based on this advice &ndash; the proverbial 59 seconds on the book jacket &ndash; is to avoid talking through traumatic experiences in favor of writing about them. Not because some self-help guru said so, but because the published research data tells us that talking doesn&#8217;t work and writing does. Not exactly intuitive, since talking through our problems with a friend always feels like the right thing to do, but I have certainly documented many times over the value of writing through a problem.</p>
<p>
<a href="http://www.amazon.com/59-Seconds-Little-Change-Borzoi/dp/B0057DCE7M/?tag=codihorr-20">59 Seconds</a> is <i>so</i> good, in fact, <b>it has rekindled my hopes that our new <a href="http://productivity.stackexchange.com">Stack Exchange Productivity Q&amp;A</a> can work.</b> I&#8217;d love for our productivity site to be founded on a scientific basis, and not the blind cult of personality I&#8217;ve come to expect from the self-help industry.</p>
<p>
Remember, nobody&#8217;s going to help you &hellip; except <i>science</i>, and if you&#8217;re willing to put in the required elbow grease each and every day &ndash; <i>yourself</i>.</p>
<p>
<a href="http://feeds.feedburner.com/codinghorror">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/nobodys-going-to-help-you-and-thats-awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a PC, Part VII: Rebooting</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/building-a-pc-part-vii-rebooting/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/building-a-pc-part-vii-rebooting/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 01:31:16 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[funny]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[bridge system]]></category>
		<category><![CDATA[building a pc]]></category>
		<category><![CDATA[effic]]></category>
		<category><![CDATA[Gbps]]></category>
		<category><![CDATA[heat buildup]]></category>
		<category><![CDATA[initial research]]></category>
		<category><![CDATA[picopsu]]></category>
		<category><![CDATA[ssds]]></category>
		<category><![CDATA[workstation recommendations]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/building-a-pc-part-vii-rebooting/</guid>
		<description><![CDATA[I&#8217;ve had more or less the same PC, with various updates, since 2007. I&#8217;ve written about most of it here: Building a PC, Part I: Minimal boot Building a PC, Part II: Burn in Building a PC, Part III: Overclocking Building a PC, Part IV: Now It&#039;s Your Turn Building a PC, Part V: Upgrading [...]]]></description>
			<content:encoded><![CDATA[<p>
I&#8217;ve had more or less the same PC, with various updates, since 2007. I&#8217;ve written about most of it here:
</p>
<ul>
<li><a href="http://www.codinghorror.com/blog/2007/07/building-a-pc-part-i.html">Building a PC, Part I: Minimal boot</a>
</li>
<li><a href="http://www.codinghorror.com/blog/2007/07/building-a-pc-part-ii.html">Building a PC, Part II: Burn in</a>
</li>
<li><a href="http://www.codinghorror.com/blog/2007/07/building-a-pc-part-iii---overclocking.html">Building a PC, Part III: Overclocking</a>
</li>
<li><a href="http://www.codinghorror.com/blog/2007/07/building-a-pc-part-iv-now-its-your-turn.html">Building a PC, Part IV: Now It&#039;s Your Turn</a>
</li>
<li><a href="http://www.codinghorror.com/blog/2008/04/building-a-pc-part-v-upgrading.html">Building a PC, Part V: Upgrading</a>
</li>
<li><a href="http://www.codinghorror.com/blog/2009/12/building-a-pc-part-vi-rebuilding.html">Building a PC, Part VI: Rebuilding</a>
</ul>
<p>
While the advice in those original articles is still quite sound, my old 2007 era case was feeling mighty creaky. I needed a new chassis. I also wanted a motherboard that supported native 6 Gbps SATA for the latest generation of SSDs that <a href="http://www.codinghorror.com/blog/2011/05/the-hot-crazy-solid-state-drive-scale.html">truly benefit from them</a>. The buzz around the Sandy Bridge based Core i7-2600k was nearly deafening, and I&#8217;ve fallen <i>completely</i> in love with <a href="http://www.codinghorror.com/blog/2011/03/revisiting-the-home-theater-pc.html">my last HTPC build based on the same technology</a>. (Oh, and even if you already read that article, read it again because I added new PicoPSU and case information that takes it from awesome to sublime &ndash; on the order of 17 watts idle!)
</p>
<p>
So I decided it was time to build myself a nice Sandy Bridge system. What I ended up with is <b>easily the best case and motherboard combination I&#8217;ve ever laid hands on</b>. Read on!
</p>
<p>
I cut out a lot of the initial research work by relying on my old, dear friends at Tech Report and <a href="http://techreport.com/articles.x/21164/8">their current workstation recommendations</a>:
</p>
<ul>
<li><a href="http://www.amazon.com/gp/product/B00503EA80/?tag=codihorr-20">Asus P8Z68-V Pro</a> $220
<li><a href="http://www.amazon.com/gp/product/B004RFBIUU/?tag=codihorr-20">Corsair Vengeance 16 GB kit</a> $155
<li><a href="http://www.amazon.com/gp/product/B004EBUXSA/?tag=codihorr-20">Core i7-2600K</a> $315
</ul>
<p>
As for the case, I was impressed by <a href="http://techreport.com/articles.x/19638">the Tech Report review of the Corsair 600T</a>, which even comes in a heart-stopping pseudo stormtrooper white. <i>WANT.</i>
</p>
<p>
<a href="http://www.amazon.com/gp/product/B004O0PAKW/?tag=codihorr-20"><img alt="Corsair-600t-special-edition" src="http://www.codinghorror.com/.a/6a0120a85dcdae970b014e89f20a7f970d-800wi" border="0" /></a>
</p>
<p>
When it comes to power supplies, <a href="http://www.codinghorror.com/blog/2007/05/upgrading-to-a-high-efficiency-power-supply.html">I&#8217;m crazy about efficiency</a>, and fortunately there are now lots of so-called &#8220;80 Plus Gold&#8221; PSUs out there now, offering a staggering <i>90% efficiency</i> under most loads. Power supply efficiency is important, because the rest of that heat is dumped back into your case. The less efficient your PSU, the more heat buildup you&#8217;ll have under load. I chose <a href="http://www.amazon.com/Seasonic-ATX12V-EPS12V-Power-Supply/dp/B004F0AQ8C/?tag=codihorr-20">the Seasonic X-760</a> &ndash; which, when bench tested, <a href="http://www.jonnyguru.com/modules.php?name=NDReviews&amp;op=Story3&amp;reid=192">indeed delivered the promised 90% efficiency</a> &ndash; but <b>any high quality 80 Plus Gold model will generally do</b>. </p>
<p>
The CPU (and possibly, depending on your tastes, the video card) is the biggest heat generator inside your PC. The better and more efficient the CPU cooler, the quieter your whole system can be. This also affects how much you can overclock. I chose the <a href="http://www.amazon.com/gp/product/B003NWXH9S/?tag=codihorr-20">Thermalright Venomous-X Silent Edition</a> on the basis of it being <a href="http://www.silentpcreview.com/tr-venomousx">the current top dog for efficiency</a>, <i>and</i> because it had a simple mounting system. Large coolers can be a real bear to install. And did I mention it comes with an especially quiet fan out of the box, too?</p>
<p>
Once I had all the parts in hand, it was a simple matter of building it up, as documented in <a href="http://www.codinghorror.com/blog/archives/000905.html">my previous post series</a>. I adore this Corsair case; it is <i>an absolute joy to work in</i>. Everything in it is cleverly designed, from the rear cable routing area with rubber grommets all over the place for easily passing cables back and forth, to the tool-less 2.5&#8243; and 3.5&#8243; bays, to the super easily removable side panels. It&#8217;s like they read a giant list of all my prior complaints with every PC case I&#8217;ve ever used and fixed every. single. last. one of them. </p>
<p>
The end result is what you see here:</p>
<p>
<img class="asset  asset-image at-xid-6a0120a85dcdae970b014e89f1f08d970d image-full" alt="New-sandy-bridge-build-internal" src="http://www.codinghorror.com/.a/6a0120a85dcdae970b014e89f1f08d970d-800wi" border="0" /></p>
<p>
There are some significant tweaks visible in the above picture that I do recommend:</p>
<ol>
<li><b>Use tin snips to remove the rear exhaust grill.</b> We don&#8217;t need it back there, and the exhaust airflow is critical. <a href="http://www.silentpcreview.com/forums/viewtopic.php?t=15810">Fan grills affect low-speed fan airflow more than you&#8217;d think</a>:<br />
<blockquote><p>
Wire grills also have an effect: ~20%. This was checked with an anemometer on several different fans of 80, 92 and 120mm size, at full and lower speeds. The airflow reduction went as high as 24% but it was never below 19%. At 12V, the reduction in airflow with most fans will be relatively harmless, though there is an increase in turbulence noise (audible to me). But at the low airflow rates SPCR members run fans, I think the airflow reduction is significant.
</p></blockquote>
<li><b>Install a 140mm rear exhaust fan</b>. The <a href="http://www.amazon.com/gp/product/B002XISTXM/?tag=codihorr-20">Noctua NF-P14</a> is expensive at $25 but is cleverly designed to give you 140mm of super-quiet fan in the space a 120mm fan would normally take. It just <i>barely</i> fits in the rear exhaust fan slot with a little nudging. But it does fit; it&#8217;s the beige fan in the above picture. It also comes with its own speed reducers and accessories.
<li><b>Use fan speed reducers on <i>all</i> the fans</b>. The case has two 200mm fans, and the 140mm fan we&#8217;re adding. I couldn&#8217;t get the Asus motherboard&#8217;s &#8220;QFan&#8221; fan control system to work, as it seems to require 4-pin fans, and all the ones I had (including the ones that came with the case) are 3-pin. While I do prefer dynamic, temperature based control when I can get it, the next best thing is to use hardware to slow down the fans. I like the <a href="http://www.google.com/search?q=zalman%20zm-56&amp;tbm=shop">Zalman-ZM-RC56 resistor connector</a> as the simplest solution, but it&#8217;s getting hard to find for some reason. The <a href="http://www.google.com/search?q=zalman%20fanmate%202&amp;tbm=shop">Zalman Fan Mate 2</a> will also work, and allows you to individually adjust the speed of each fan. The case also has a built in fan controller &ndash; that&#8217;s the knob you see on the front top &ndash; but I found it too limited in range for my purposes.
<li><b>Add acoustic foam to taste</b>. Between inexpensive eggcrate foam and thin, adhesive backed open-cell foam, you can easily reduce that last 10-20% of fan noise to a very pleasant white noise. It works well in the areas pictured, and also on the interior of the side panel &#8220;facing&#8221; the fans. See item 6 in my <a href="http://www.codinghorror.com/blog/2006/08/building-a-quiet-pc.html">Building a Quiet PC</a> post for details.
</ol>
<p>
And then, of course, <a href="http://www.codinghorror.com/blog/2007/07/building-a-pc-part-iii---overclocking.html">the overclockening</a>. What kind of geek would I be if I didn&#8217;t attempt to <i>turn this baby up to 11?</i> This is another area where Sandy Bridge is a revelation: <b>so long as you buy one of the blessed &#8220;K&#8221; series processors, overclocking is as simple as setting the multiplier to the desired value.</b> It is ridiculously simple. And my results, for once, were immediately as good as the ones everyone else was crowing about: <i>4.4 GHz totally stable!</i></p>
<p>
<img alt="Sandy-bridge-overclock" src="http://www.codinghorror.com/.a/6a0120a85dcdae970b01538ffee801970b-800wi" border="0" /></p>
<p>
(beware: there is one <a href="http://vip.asus.com/forum/view.aspx?id=20110611021059226&amp;SLanguage=en-us&amp;board_id=1&amp;model=P8P67%20PRO&amp;page=1">nasty little issue</a> with the Asus motherboard&#8217;s auto-overclock feature. The PLL Overvoltage setting, which auto-overclock &#8220;helpfully&#8221; enables, completely bollixes up resuming from sleep. Just turn it off, and all is well. I don&#8217;t even want to tell you how long it took me to figure <i>that</i> one out.)</p>
<p>
The total package with a nice SSD delivers a near-perfect <a href="http://www.codinghorror.com/blog/2006/09/have-you-ever-been-windows-experienced.html">Windows Experience score</a>:</p>
<p>
<img alt="Sandy-bridge-windows-experience-score" src="http://www.codinghorror.com/.a/6a0120a85dcdae970b015433d240d0970c-800wi" border="0" /></p>
<p>
I won&#8217;t lie to you. This is not a compact build. It&#8217;s big! Those roomy side areas come at a cost, and that makes it a very <i>wide</i> case. But that&#8217;s to be expected for a desktop powerhouse machine. And since my last case lasted me from 2007-2011, I&#8217;ll happily accept a little bulk for something that&#8217;s easy to work on and upgrade over time.</p>
<p>
<img alt="New-sandy-bridge-build-external" src="http://www.codinghorror.com/.a/6a0120a85dcdae970b01538ffe7761970b-800wi" border="0" /></p>
<p>
It&#8217;s a fantastic new reboot of my system, and I didn&#8217;t expect to be this excited about the final result. This is not merely an incremental improvement over what I had, it&#8217;s <i>much</i> quieter, easier to work on, and when overclocked to 4.4 GHz, noticeably faster too. (I do slightly mourn <a href="http://www.codinghorror.com/blog/2011/01/24-gigabytes-of-memory-ought-to-be-enough-for-anybody.html">the loss of 8 GB of RAM</a>, but I&#8217;ll survive.)</p>
<p>
In this build, I already had hard drives, DVD drive, a sound card, and so forth &hellip; but for completeness&#8217; sake I&#8217;ll list everything here if you want to mirror this setup. Realize that some of this comes down to personal taste, so I&#8217;m just listing what <i>I</i> recommend. Feel free to change anything out, and bear in mind that Sandy Bridge has decent default onboard video as well.
</p>
<ul>
<li><a href="http://www.amazon.com/gp/product/B00503EA80/?tag=codihorr-20">Asus P8Z68-V Pro</a> $220
<li><a href="http://www.amazon.com/gp/product/B004RFBIUU/?tag=codihorr-20">Corsair Vengeance 16 GB RAM</a> $155
<li><a href="http://www.amazon.com/gp/product/B004EBUXSA/?tag=codihorr-20">Core i7-2600K CPU</a> $315
<li><a href="http://www.amazon.com/gp/product/B004O0PAKW/?tag=codihorr-20">Corsair 600T Special Edition case</a> $170
<li><a href="http://www.amazon.com/Corsair-Professional-High-Performance-850-Watt-CMPSU-850AX/dp/B003PJ6QW4/?tag=codihorr-20">Corsair 850w 80 Plus Gold PSU</a> $170
<li><a href="http://www.amazon.com/gp/product/B003NWXH9S/?tag=codihorr-20">Thermalright Venomous-X Silent Edition CPU heatsink</a> $75
<li><a href="http://www.amazon.com/OCZ-Technology-Vertex-2-5-Inch-VTX3-25SAT3-240G/dp/B004QJM1HG/?tag=codihorr-20">Vertex 3 240 GB SSD</a> $500
<li><a href="http://www.amazon.com/Western-Digital-3-5-Inch-Internal-Desktop/dp/B004YNQKRG">WD Caviar Green 3 TB HDD</a> $170
<li><a href="http://www.amazon.com/gp/product/B002XISTXM/?tag=codihorr-20">Noctua Ultra Silent 140mm Fan NF-P14 FLX</a> $25
<li><a href="http://www.amazon.com/Sapphire-DL-DVI-I-SL-DVI-D-PCI-Express-100315L/dp/B0047ZGIUK/?tag=codihorr-20">Radeon 6850 triple monitor capable video card</a> $170
</ul>
</p>
<p>
Remember, if you can put together a LEGO kit, you can build this totally sweet PC for yourself, too. Good luck and happy building!</p>
<p>
<a href="http://feeds.feedburner.com/codinghorror">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/building-a-pc-part-vii-rebooting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>6 Methods For Vertical Centering With CSS</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/6-methods-for-vertical-centering-with-css/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/6-methods-for-vertical-centering-with-css/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 11:16:52 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[first choice]]></category>
		<category><![CDATA[inline element]]></category>
		<category><![CDATA[inline elements]]></category>
		<category><![CDATA[level element]]></category>
		<category><![CDATA[level elements]]></category>
		<category><![CDATA[margins]]></category>
		<category><![CDATA[table cells]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/6-methods-for-vertical-centering-with-css/</guid>
		<description><![CDATA[Centering elements vertically with css is something that often gives designers trouble. There are however a variety of methods for vertical centering and each is fairly easy to use. Today I want to present 6 of those methods. I&#8217;ve usually skipped over the topic of vertical centering, since there are some good posts already out [...]]]></description>
			<content:encoded><![CDATA[<p>Centering elements vertically with css is something that often gives designers trouble. There are however a variety of methods for vertical centering and each is fairly easy to use. Today I want to present 6 of those methods.<br />
<span></span><br />
I&#8217;ve usually skipped over the topic of vertical centering, since there are some good posts already out there that are easy enough to find, but recently <a href="http://www.vanseodesign.com/css/2-column-layout-code/#div-comment-124165">Bikram commented</a> requesting a tutorial on vertically centering so I thought why not. </p>
<p>You can view demos of each of the methods below by <a href="http://vanseodesign.com/blog/demo/vertical-centering/line-height.php">clicking here</a>. Clicking the images above each section will also take you to that specific demo.</p>
<p>Let&#8217;s start by first talking about something that doesn&#8217;t work as many expect. Understanding why vertical-align doesn&#8217;t always work will help us better understand vertical centering in general.</p>
<p><a href="http://filh.deviantart.com/art/Vertical-Light-169168405"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/vertical-light.jpg" alt="abstract photograph of vertical light" width="465" height="349" /></a></p>
<h2>Vertical-Align</h2>
<p><a href="http://www.vanseodesign.com/css/centering-with-css/">Horizontal centering with css</a> is rather easy. When the element to be centered is an inline element we use text-align center on its parent. When the element is a block level element we give it a width and set the left and right margins to a value of auto.</p>
<p>With text-align: center in mind, most people look first to <a href="http://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align">vertical-align</a> in order to center things vertically. It seems logical and I know it was my first choice. If you&#8217;ve come from table based layout you likely used the valign attribute, which would also lead you to believe vertical-align is the way to go.</p>
<p>However valign only worked on table cells. Vertical-align is similar. It also applies to table cells and it works with some inline elements.</p>
<p>The values for vertical-align have meaning with respect to a parent inline element.</p>
<ul>
<li>With a line of text the values are relative to the line-height.</li>
<li>With a table cell the values are relative to the <a href="http://www.w3.org/TR/CSS2/tables.html#height-layout">table-height-algorithm</a>, which usually means the height of the row.</li>
</ul>
<p>Unfortunately <a href="http://css-tricks.com/2597-what-is-vertical-align/">vertical-align</a> doesn&#8217;t apply to block-level elements like a paragraph inside a div, which is where most of us figure out it isn&#8217;t the be all solution to vertical centering.</p>
<p>All is not lost though, as we have other methods for centering block level elements and we can still use vertical-align where appropriate. Which method you choose will depend on what you&#8217;re trying to center relative to its container element.</p>
<p><a href="http://vanseodesign.com/blog/demo/vertical-centering/line-height.php"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/line-height.png" alt="line height demo" width="465" height="231" /></a></p>
<h2>Line-Height Method</h2>
<p>This method will work when you want to vertically center a single line of text. All we need to do is set a line-height on the element containing the text larger than it&#8217;s font-size.</p>
<p>By default equal space will be given above and below the text and so the text will sit in the vertical center.</p>
<p>Most tutorials will also set the height on the element with the same value given to the <a href="http://www.vanseodesign.com/css/thoughts-on-building-a-typographic-stylesheet/">line-height</a>. I don&#8217;t think setting the height is necessary, but if line-height alone doesn&#8217;t work for you setting the height of the element will likely be the solution.</p>
<h3>html</h3>
<pre>
<span>&lt;div id=<span>&quot;parent&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;child&quot;</span>&gt;</span>Text here<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<h3>css</h3>
<pre>
<span>#child {</span>
	<span>line-height</span><span>:</span><span> 200px</span><span>;</span>
<span>}</span>
</pre>
<p>The above works in all browsers, however it will only work for a single line of text. If your text could wrap to a 2nd line you need to use a different method. The value of 200px above is arbitrary. You can use any value you want as long as it&#8217;s larger than the font-size that&#8217;s been set.</p>
<h3>Centering an Image with Line-Height</h3>
<p>What if the content you want centered is an image? Will this method work? The answer is yes with one additional line of css.</p>
<h3>html</h3>
<pre>
<span>&lt;div id=<span>&quot;parent&quot;</span>&gt;</span>
	<span>&lt;img src=<span>&quot;image.png&quot;</span> alt=<span>&quot;&quot;</span> /&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<h3>css</h3>
<pre>
<span>#parent {</span>
	<span>line-height</span><span>:</span><span> 200px</span><span>;</span>
<span>}</span>
<span>#parent img {</span>
	<span>vertical-align</span><span>:</span><span> middle</span><span>;</span>
<span>}</span>
</pre>
<p>You set the line-height as we did above (It&#8217;ll need to be greater than the height of the image) and then set vertical-align: middle on the image.</p>
<p><a href="http://vanseodesign.com/blog/demo/vertical-centering/table-cell.php"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/table-cell.png" alt="table cell demo" width="465" height="233" /></a></p>
<h2>CSS Table Method</h2>
<p>Above I mentioned that vertical-align applies to table cells which leads us to this method. We&#8217;ll display our elements as table and table cell and then use the vertical-align property to center the content.</p>
<p><strong>Note:</strong> CSS tables are not the same as <a href="http://www.vanseodesign.com/css/css-divs-vs-tables/">html tables</a>.</p>
<h3>html</h3>
<pre>
<span>&lt;div id=<span>&quot;parent&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;child&quot;</span>&gt;</span>Content here<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<h3>css</h3>
<pre>
<span>#parent {</span><span>display</span><span>:</span><span> table</span><span>;</span><span>}</span>
<span>#child {</span>
	<span>display</span><span>:</span><span> table-cell</span><span>;</span>
	<span>vertical-align</span><span>:</span><span> middle</span><span>;</span>
<span>}</span>
</pre>
<p>We set the parent div to display as a table and the child div to display as a table-cell. We can then use vertical-align on the child div and set it&#8217;s value to middle. Anything inside this child div will be vertically centered.</p>
<p>Unlike the method above the content can be dynamic as the div will grow with what&#8217;s placed inside. The downside of this method is it doesn&#8217;t work in older versions of IE, though there is a fix, which is to add display: inline-block to the child element.</p>
<pre>
<span>#child {</span>
	<span>display</span><span>:</span><span> inline-block</span><span>;</span>
<span>}</span>
</pre>
<ul>
<li><a href="http://www.456bereastreet.com/archive/201103/flexible_height_vertical_centering_with_css_beyond_ie7/">Flexible height vertical centering with CSS, beyond IE7</a></li>
<li><a href="http://www.brunildo.org/test/vertmiddle.html">CSS Vertical Centering</a></li>
</ul>
<p><a href="http://vanseodesign.com/blog/demo/vertical-centering/positioning-margins.php"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/positioning-margin.png" alt="absolute positioning and negative margin demo" width="465" height="232" /></a></p>
<h2>Absolute Positioning and Negative Margin</h2>
<p>This method works for block level elements and also works in all browsers. It does require that we set the height of the element we want to center.</p>
<p>In the code below I&#8217;m centering the child both vertically and horizontally using this method.</p>
<h3>html</h3>
<pre>
<span>&lt;div id=<span>&quot;parent&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;child&quot;</span>&gt;</span>Content here<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<h3>css</h3>
<pre>
<span>#parent {</span><span>position</span><span>:</span><span> relative</span><span>;</span><span>}</span>
<span>#child {</span>
	<span>position</span><span>:</span><span> absolute</span><span>;</span>
	<span>top</span><span>:</span><span> 50%</span><span>;</span>
	<span>left</span><span>:</span><span> 50%</span><span>;</span>
	<span>height</span><span>:</span><span> 30%</span><span>;</span>
	<span>width</span><span>:</span><span> 50%</span><span>;</span>
	<span>margin</span><span>:</span><span> -15% 0 0 -25%</span><span>;</span>
<span>}</span>
</pre>
<p>We begin by <a href="http://www.vanseodesign.com/css/css-positioning/">positioning</a> both parent and child divs. Next we set the top and left values of the child to be 50% each, which would be the center of the parent. However this sets the top left corner to be in the center so we&#8217;re not done.</p>
<p>We need to move the child up (by half its height) and to the left (by half its width) so it&#8217;s center is what sits in the center of the parent element. This is why we need to know the height (and here the width) of the child element.</p>
<p>To do that we give the element a negative top and left margin equal to half its height and width.</p>
<p>Unlike the first 2 methods this one is meant for block level elements. It does work in all browsers, however the content can outgrow its container in which case it will disappear visually. It&#8217;ll work best when you know the heights and widths of the elements.</p>
<ul>
<li><a href="http://www.wpdfd.com/editorial/thebox/deadcentre3.html">A demo using this method to center a block of text in the browser</a></li>
</ul>
<p><a href="http://vanseodesign.com/blog/demo/vertical-centering/positioning-stretch.php"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/positioning-stretch.png" alt="absolute positioning and vertical stretching demo" width="465" height="230" /></a></p>
<h2>Absolute Positioning and Stretching</h2>
<p>As with the method above this one begins by setting positioning on the parent and child elements as relative and absolute respectively. From there things differ.</p>
<p>In the code below I&#8217;ve once again used this method to center the child both horizontally and vertically, though you can use the method for vertical centering only.</p>
<h3>html</h3>
<pre>
<span>&lt;div id=<span>&quot;parent&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;child&quot;</span>&gt;</span>Content here<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<h3>css</h3>
<pre>
<span>#parent {</span><span>position</span><span>:</span><span> relative</span><span>;</span><span>}</span>
<span>#child {</span>
	<span>position</span><span>:</span><span> absolute</span><span>;</span>
	<span>top</span><span>:</span><span> 0</span><span>;</span>
	<span>bottom</span><span>:</span><span> 0</span><span>;</span>
	<span>left</span><span>:</span><span> 0</span><span>;</span>
	<span>right</span><span>:</span><span> 0</span><span>;</span>
	<span>width</span><span>:</span><span> 50%</span><span>;</span>
	<span>height</span><span>:</span><span> 30%</span><span>;</span>
	<span>margin</span><span>:</span><span> auto</span><span>;</span>
<span>}</span>
</pre>
<p>The idea with this method is to try to get the child element to stretch to all 4 edges by setting the top, bottom, right, and left vales to 0. Because our child element is smaller than our parent elements it can&#8217;t reach all 4 edges.</p>
<p>Setting auto as the margin on all 4 sides however causes opposite margins to be equal and displays our child div in the center of the parent div.</p>
<p>Unfortunately the above won&#8217;t work in IE7 and below and like the previous method the content inside the child div can grow too large causing it to be hidden.</p>
<p><a href="http://vanseodesign.com/blog/demo/vertical-centering/padding.php"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/padding.png" alt="vertical centering with padding demo" width="465" height="253" /></a></p>
<h2>Equal Top and Bottom Padding</h2>
<p>In the method above we allowed the browser to automatically set the margins of the child element so they would be equal. In this method we&#8217;ll do something similar and explicitly set the top and bottom padding of the parent to be equal.</p>
<h3>html</h3>
<pre>
<span>&lt;div id=<span>&quot;parent&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;child&quot;</span>&gt;</span>Content here<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<h3>css</h3>
<pre>
<span>#parent {</span>
	<span>padding</span><span>:</span><span> 5% 0</span><span>;</span>
<span>}</span>
<span>#child {</span>
	<span>padding</span><span>:</span><span> 10% 0</span><span>;</span>
<span>}</span>
</pre>
<p>In the css above I&#8217;ve set top and bottom paddings on both elements. Setting it on the child will make sure the contents in the child will be vertically centered and setting it on the parent ensures the entire child is centered within the parent.</p>
<p>I&#8217;m using <a href="http://www.vanseodesign.com/css/fluid-layout-code/">relative measurements</a> to allow each div to grow dynamically. If one of the elements or it&#8217;s content needs to be set with an absolute measurement then you&#8217;ll need to do some math to make sure things add up.</p>
<p>For example if the parent was 400px in height and the child 100px in height we&#8217;d need 150px of padding on both the top and bottom.</p>
<p>150 + 150 + 100 = 400</p>
<p>Using % could throw things off in this case unless our % values corresponded to exactly 150px.</p>
<p>This method works anywhere. The downside is that depending on the specifics of your project you may need to do a little math. However if you&#8217;re falling in line with the idea of <a href="http://www.vanseodesign.com/css/elastic-layout-code/">developing flexible layouts</a> where your measurements are all relative you can avoid the math.</p>
<p><strong>Note:</strong> This method works by setting paddings on the outer elements. You can flip things and instead set equal margins on the inner elements. I tend to use padding, but I&#8217;ve also used margins with success. Which you choose would depend on the specifics of your project.</p>
<p><a href="http://vanseodesign.com/blog/demo/vertical-centering/floater.php"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/floater-div.png" alt="vertical centering with floater div demo" width="465" height="291" /></a></p>
<h2>Floater Div</h2>
<p>This last method requires an empty div which is <a href="http://www.vanseodesign.com/css/understanding-css-floats/">floated</a> and used to control where our child element sits in the document flow. Notice the floater div comes before our child div in the html below.</p>
<h3>html</h3>
<pre>
<span>&lt;div id=<span>&quot;parent&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;floater&quot;</span>&gt;</span><span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;child&quot;</span>&gt;</span>Content here<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<h3>css</h3>
<pre>
<span>#parent {</span><span>height</span><span>:</span><span> 250px</span><span>;</span><span>}</span>
<span>#floater {</span>
	<span>float</span><span>:</span><span> left</span><span>;</span>
	<span>height</span><span>:</span><span> 50%</span><span>;</span>
	<span>width</span><span>:</span><span> 100%</span><span>;</span>
	<span>margin-bottom</span><span>:</span><span> -50px</span><span>;</span>
<span>}</span>
<span>#child {</span>
	<span>clear</span><span>:</span><span> both</span><span>;</span>
	<span>height</span><span>:</span><span> 100px</span><span>;</span>
<span>}</span>
</pre>
<p>We float the empty div to the left (or right) and give it a height of 50% of the parent div. That causes it to fill up the entire upper half of the parent element.</p>
<p>Because this div is floated it&#8217;s removed from the normal document flow so we need to clear the child element. Here I&#8217;ve used clear: both, but you just need to clear in the same direction you floated the empty floater div.</p>
<p>The top edge of the child div should now be immediately below the bottom edge of the floater div. We need to bring the child element up by an amount equal to half it&#8217;s height and to do so we set a negative margin-bottom on the floater div.</p>
<p>This method also works across browsers. The downside is that it requires an empty div and that you know the height of the child element.</p>
<ul>
<li><a href="http://cranesandskyhooks.com/articles/center-content-vertically-with-css/">How To Center Content Vertically Using CSS</a></li>
</ul>
<h2>Additional Resources</h2>
<p>In the sections above I linked to articles specific to each method. Below are some resources that cover more than a single method for centering.</p>
<ul>
<li><a href="http://blog.themeforest.net/tutorials/vertical-centering-with-css/">Vertical Centering With CSS</a> &mdash; covers all the methods above except for the padding method</li>
<li><a href="http://www.sohtanaka.com/web-design/vertical-alignment-css/">Two Simple Ways to Vertically Align with CSS</a> &mdash; Covers absolute positioning and negative margins and the line height methods</li>
<li><a href="http://www.student.oulu.fi/~laurirai/www/css/middle/">Vertical centering using CSS</a> &mdash; Covers all methods except the floater div method and adds a few more.</li>
<li><a href="http://www.brunildo.org/test/">CSS tests and experiments</a> &mdash; Contains a variety of css experiments. Search the page for the word vertical and you&#8217;ll find several vertical centering experiments, including the 2 links below.</li>
<li><a href="http://www.brunildo.org/test/img_center.html">Centering (horizontally and vertically) an image in a box</a></li>
<li><a href="http://www.brunildo.org/test/shrink_center_5.html">Shrink-wrap and Center</a></li>
</ul>
<p><a href="http://www.flickr.com/photos/rykneethling/5880139445/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/fence.jpg" alt="verticle fence posts" width="465" height="310" /></a></p>
<h2>Summary</h2>
<p>None of the methods above is complicated and I&#8217;m sure if you use each once or twice it&#8217;ll be easy to use again.</p>
<p>The difficultly if there is one is that none of the methods above is perfect for all occasions. The trick is to understand several of the above and use each appropriately.</p>
<p>Some of the methods work better for inline elements and others work better for block level elements. Some might work better with your preference for developing a layout and some don&#8217;t work in older versions of a certain browser we all know well.</p>
<p>Rarely do I vertically center elements in a design. When I do the methods I tend to use are the line-height method and the equal padding method. One or the other has always worked for my needs.</p>
<p>If neither worked I would reach for either the positioning or floater methods and save the table cell method as a last resort. In time we&#8217;ll be able to use the <a href="http://www.w3.org/TR/css3-flexbox/">css3 flexible box layout module</a> and forget about the methods above, but for now browser support isn&#8217;t quite there.</p>
<p>Do you use any of the above methods or do you use a different method I didn&#8217;t mention? Is there a vertical centering issue that none of the methods here address?</p>
<p><img src="http://www.vanseodesign.com/blog/?ak_action=api_record_view&amp;id=3100&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/hKPrOT1fsbiYRa3BJfmr-O9R8wI/0/da"><img src="http://feedads.g.doubleclick.net/~a/hKPrOT1fsbiYRa3BJfmr-O9R8wI/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/hKPrOT1fsbiYRa3BJfmr-O9R8wI/1/da"><img src="http://feedads.g.doubleclick.net/~a/hKPrOT1fsbiYRa3BJfmr-O9R8wI/1/di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/07HUpXkZyg4" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/6-methods-for-vertical-centering-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>9 Steps To Improve Your Design Confidence</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/9-steps-to-improve-your-design-confidence/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/9-steps-to-improve-your-design-confidence/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 11:15:14 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[design confidence]]></category>
		<category><![CDATA[designers]]></category>
		<category><![CDATA[Gist]]></category>
		<category><![CDATA[maturity]]></category>
		<category><![CDATA[quotes]]></category>
		<category><![CDATA[rationale]]></category>
		<category><![CDATA[signals]]></category>
		<category><![CDATA[warda]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/9-steps-to-improve-your-design-confidence/</guid>
		<description><![CDATA[How much of your design process do you share? Do you show your unfinished work in public? Are you afraid of the feedback you might receive? Most importantly how can you improve your confidence as a designer? A few weeks ago Rosevita Warda posted Designing in the Open at 37 Signals. The gist of the [...]]]></description>
			<content:encoded><![CDATA[<p>How much of your <a href="http://www.vanseodesign.com/web-design/pixel-perfect/">design process</a> do you share? Do you show your unfinished work in public? Are you afraid of the feedback you might receive? Most importantly how can you improve your confidence as a designer?<br />
<span></span><br />
<a href="http://smllan.deviantart.com/art/i-m-not-superman-119008542"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/not-superman.jpg" alt="I'm not Superman" width="465" height="466" /></a></p>
<p>A few weeks ago Rosevita Warda posted <a href="http://37signals.com/svn/posts/2928-designing-in-the-open">Designing in the Open</a> at 37 Signals. The gist of the post is that the more confident we feel in our design process, the more we show our work, resulting in more feedback that helps make us better designers.</p>
<p>This can be seen in the following 2 quotes from the post.</p>
<blockquote><p>
There’s a phase we go through in our maturity as designers. At first we don’t have a lot of confidence in our process, so we hide while we work.
</p>
</blockquote>
<blockquote><p>
When we get more confident a new phase opens up. We believe more in our process and we know that things are never perfect. So we start showing work earlier and start talking about our rationale at a given step.
</p>
</blockquote>
<p>I&#8217;m guessing most of you can identify with the first quote above. I know I can. Hopefully you can also identify with the second quote. I think I&#8217;m getting there.</p>
<p>The message is that designing more in the open leads to better work. The question then is how can we build our confidence so that we&#8217;re more willing to design in the open.</p>
<p><a href="http://lung2005.deviantart.com/art/Confidence-A-true-story-154626624"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/confidence-4.jpg" alt="Abstract design around the word confidence" width="465" height="310" /></a></p>
<h2>How to Improve Your Confidence as a Designer</h2>
<p>Being confident in your work is not always an easy thing to do, especially where anything <a href="http://www.vanseodesign.com/web-design/creativity/">creative</a> is involved.</p>
<p>The trick is to find a small measure of confidence and build from there.</p>
<h3>Don&#8217;t Compare Yourself to the Best</h3>
<p>It&#8217;s natural for us to compare our work to the work we want to create, but it comes with a price. You&#8217;re not supposed to be as good as the best when first starting so don&#8217;t let it get you down if your work isn&#8217;t as good as the work of your favorite designers.</p>
<p>Instead compare yourself to yourself. Are you doing better work today than you were 6 months ago? A year ago? <a href="http://www.vanseodesign.com/web-design/steal-like-a-designer/">Absorb the work of others</a> to help yourself grow, but compare yourself only to yourself.</p>
<h3>Identify Your Strengths and Weaknesses</h3>
<p>If you lack confidence there&#8217;s a reason why. You&#8217;re likely focusing on the things you don&#8217;t do well. Focus instead on the things you can do well.</p>
<p>We all have strengths and weaknesses. Realize there are things you do well and take some confidence from them. Realize too there are things you need to work at and improve.</p>
<p>For me a strength was something as simple as <a href="http://www.vanseodesign.com/web-design/taste-skill-gap/">trusting my eye</a>. Perhaps I couldn&#8217;t create designs to make the world say wow, but I could at least see wow in the works of others and see that I wasn&#8217;t delivering it myself.</p>
<p>It might not seem like much, but it was enough to give me the confidence to keep at it.</p>
<p><a href="http://www.flickr.com/photos/46648834@N02/5867257489/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/barbell-2.jpg" alt="Weightlifter and barbell" width="465" height="263" /></a></p>
<h3>Sharing Your Strengths</h3>
<p>You have some strengths so play to them. Maybe you&#8217;re skills working with type aren&#8217;t great, but you&#8217;re good working with color. Maybe all you think you can do well is see the good in the work of others. Share that.</p>
<p>Share any aspect where you do feel some confidence and enter the process of designing in the open.</p>
<h3>Improve Your Weaknesses</h3>
<p>It&#8217;s normal to be hesitant in sharing things we don&#8217;t do well. Identify one weaknesses and <a href="http://www.vanseodesign.com/web-design/teach-yourself-design/">work to improve it</a>.</p>
<p>Do you struggle with color? Learn more about how others work with color. Study sites you like. Grab some books and learn the theory behind color. Find techniques others use for creating color schemes.</p>
<p>Choose <a href="http://www.vanseodesign.com/web-design/palettes/">one aspect of design</a> to study and dive in.</p>
<p><a href="http://oneskillwonder.deviantart.com/art/Practice-Safe-Design-165694242"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/practice-safe-design.png" alt="Practice safe design. Use a concept" width="465" height="465" /></a></p>
<h3>Practice, Practice, Practice</h3>
<p> Learning the theory is only one part of the equation. You need to practice the theory. Take that technique you learned for creating a color scheme and use it on your next project.</p>
<p>You have to practice in order to improve. I always strive to practice something new with each new site. I may have to fall back on something I know will work in order to get the job done, but not until after I&#8217;ve given something new a try.</p>
<h3>Start Sharing More</h3>
<p>As you gain more knowledge and experience with one aspect of design share more of that aspect. If you&#8217;re not yet ready to show your work <a href="http://www.vanseodesign.com/blogging/writing-and-design/">write about it</a> instead. Tell others what you&#8217;re doing and what&#8217;s working and what&#8217;s not working.</p>
<p>Create a simple demo showing how you approached the problem. You don&#8217;t have to share real projects to enter the process. Share what you can in any way you can.</p>
<p>Often on this blog I choose a subject I don&#8217;t know much about. Like most I&#8217;d prefer not to embarrass myself publicly so I put more into the learning and work harder so I can hopefully write something intelligently about the subject.</p>
<p><a href="http://venomart.deviantart.com/art/FeedBack-41599657"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/feedback-2.jpg" alt="Abstract poster of feedback" width="465" height="439" /></a></p>
<h3>Be Open to Feedback</h3>
<p>As you share more you&#8217;ll get more feedback both good and bad. You can&#8217;t selectively listen to only the good or only the bad. Listen to it all. Don&#8217;t let the good go to your head and don&#8217;t let the bad get you down.</p>
<p>When you disagree with a <a href="http://www.davidairey.com/aesop-fable-two-bags/">critique</a> move on. When you think someone may be right explore deeper what they said and what you can learn from it.</p>
<p>Ultimately you have to decide the value of any feedback you receive, but to do that you need to be open to receiving it.</p>
<h3>Offer Feedback to Others</h3>
<p>A number of years ago I took a writing course where students would spend time <a href="http://www.vanseodesign.com/blogging/how-critiquing-a-blog-can-improve-your-writing/">critiquing each other&#8217;s work</a>. Most thought the value was in the feedback they received. I found more value in offering feedback to others.</p>
<p>Instead of offering a few quick thoughts I would dig deep into what they wrote and offered opinions on how I thought they could improve their work.</p>
<p>Whether or not people listened to my feedback was irrelevant to my growth. I found that in <a href="http://sixrevisions.com/project-management/critical-thinking-learning-tool/">critically thinking</a> how to improve the work or others I was greatly learning to improve my own work as well.</p>
<h3>Rinse and Repeat</h3>
<p>You can never stop learning and improving. Even the best among us have more to learn and room for growth. Continue to identify areas for improvement and areas of strengths and keep sharing both as you feel comfortable.</p>
<p>Objectively listen to the feedback you receive and let it help you grow.</p>
<p>I know I&#8217;m making the above sound easier than it really is, but it does work. Each small step you take leads you closer to your greater goal. In time you&#8217;ll feel more confident about more of your process and you&#8217;ll find yourself less hesitant to share in general.</p>
<p><a href="http://igamer.deviantart.com/art/Superman-58019847"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/07/superman.jpg" alt="Superman logo" width="465" height="372" /></a></p>
<h2>Summary</h2>
<p>All creative people struggle with confidence at times. It&#8217;s the nature of doing work where the quality of results is part subjective.</p>
<p>It&#8217;s not just you or me. It happens to all of us. It leads many to hide their design process and work in secret, which only feeds into the lack of confidence you feel.</p>
<p>The more we design in the open, the more we&#8217;re willing to share and <a href="http://www.wired.com/magazine/2011/06/ff_feedbackloop/all/1">open ourselves to feedback</a>, the better we get and the more confidence we gain.</p>
<p>You don&#8217;t need to share everything at once, but the sooner you enter the designing in the open process, the quicker you&#8217;ll improve as a designer.</p>
<p>Also know that while this post has specifically focused on design the ideas above can be applied to anything in your life where you lack confidence and want to improve.</p>
<p><img src="http://www.vanseodesign.com/blog/?ak_action=api_record_view&amp;id=3084&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/-4Uvofo4SWVEfjqwptf2kFUhisc/0/da"><img src="http://feedads.g.doubleclick.net/~a/-4Uvofo4SWVEfjqwptf2kFUhisc/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/-4Uvofo4SWVEfjqwptf2kFUhisc/1/da"><img src="http://feedads.g.doubleclick.net/~a/-4Uvofo4SWVEfjqwptf2kFUhisc/1/di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/J0TKIOjgI44" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/9-steps-to-improve-your-design-confidence/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts On Developing A Responsive Design Workflow</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/thoughts-on-developing-a-responsive-design-workflow/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/thoughts-on-developing-a-responsive-design-workflow/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 11:10:12 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[design workflow]]></category>
		<category><![CDATA[device characteristics]]></category>
		<category><![CDATA[device os]]></category>
		<category><![CDATA[flexible images]]></category>
		<category><![CDATA[fluid images]]></category>
		<category><![CDATA[physical constraint]]></category>
		<category><![CDATA[relative measurements]]></category>
		<category><![CDATA[responsive design]]></category>
		<category><![CDATA[responsive web]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/thoughts-on-developing-a-responsive-design-workflow/</guid>
		<description><![CDATA[Print design has the physical constraint of the canvas. The format is fixed. The situation is different on the web. We can&#8217;t know in advance exactly how someone will view our sites. We don&#8217;t have a fixed canvas. We need to create websites with the ability to adapt and respond. Designing for the web means [...]]]></description>
			<content:encoded><![CDATA[<p>Print design has the physical constraint of the canvas. The format is fixed. The situation is different on the web. We can&#8217;t know in advance exactly how someone will view our sites. We don&#8217;t have a fixed canvas. We need to create websites with the ability to <a href="http://jasonthings.com/2011/03/626/">adapt and respond</a>.<br />
<span></span><br />
Designing for the web means being open to the flexible nature of the web. We need to develop flexibly so our sites work well and look good across a range of devices and device characteristics. These are the ideas behind responsive design.</p>
<p><a href="http://www.abookapart.com/products/responsive-web-design"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/responsive-design-book.png" alt="Responsive Web Design by Etahn Marcotte" width="465" height="214" /></a></p>
<h2>How To Build A Responsive site</h2>
<p>Believe it or not we&#8217;ve already covered all the technical details for building responsive sites over the last few weeks. In order to create a responsive site we need to use:</p>
<ul>
<li><a href="http://www.vanseodesign.com/css/elastic-layout-code/">Flexible grids</a> &mdash; which are based on relative measurements, ideally elastic sites that are relative to something internal to the design. We want to be developing from the inside out. <a href="http://www.markboulton.co.uk/journal/comments/a-richer-canvas">Content out, not canvas in</a>.</li>
<li><a href="http://www.vanseodesign.com/css/flexible-images/">Flexible images</a> &mdash; that can adapt to our adapting layout. We want to create images that can resize as the layout resizes while still looking good.</li>
<li><a href="http://www.vanseodesign.com/css/media-queries/">Media queries</a> &mdash; to serve different presentation (and possibly different content) to different device, OS, browser, screen width, etc</li>
</ul>
<p>The last few weeks we&#8217;ve gone over the details of each of the above and I&#8217;ll refer you back to those posts for the details. Even better would be to take a look at the work of Ethan Marcotte.</p>
<p>Ethan is the person responsible for responsive web design and my posts, including this one have relied heavily on his work and writing.</p>
<ul>
<li><a href="http://www.alistapart.com/articles/responsive-web-design/">Responsive Web Design</a></li>
<li><a href="http://www.alistapart.com/d/responsive-web-design/ex/ex-site-flexible.html">Example Site for Responsive Design</a></li>
<li><a href="http://www.alistapart.com/articles/fluidgrids/">Fluid Grids</a></li>
<li><a href="http://unstoppablerobotninja.com/entry/fluid-images">Fluid Images</a></li>
<li><a href="http://www.abookapart.com/products/responsive-web-design">A Book Apart, Responsive Web Design</a></li>
</ul>
<p>I can&#8217;t recommend the links above enough, particularly the last link, Ethan&#8217;s new book on responsive web design. Seriously it&#8217;s $9 for a digital copy. If you want to learn responsive design spend the $9 and read the book.</p>
<p>With the technical details covered elsewhere I want to spend the rest of this post with some thoughts about responsive design including some ideas for developing a responsive workflow.</p>
<p><p><a href="http://vimeo.com/4661618">InteractiveWall</a> from <a href="http://vimeo.com/user1760316">Festo HQ</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<h2>Thoughts About Responsive Design</h2>
<p>I&#8217;m only beginning my exploration of responsive design. I can&#8217;t offer advice based on experience at the moment so I&#8217;ve been leaning on the advice of others, mostly Ethan. I would however like to share some thoughts as one beginning the exploration.</p>
<p>A couple of months ago when I began talking about different css layouts. I had listed some <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-2/">pros and cons of responsive layouts</a> and later added:</p>
<blockquote><p>However in the end it’s browser and object detection. If history is a teacher developers will push toward standards over detection and device makers will become more consistent in how they render websites.</p>
</blockquote>
<p>At the time I was a little too focused on the media query part (perhaps I was just reaching for cons to balance the pros in that post). I&#8217;d like to amend my previous thoughts.</p>
<p>The problem in the past with browser detection was how complicated it was and that it didn&#8217;t always work. Media queries don&#8217;t have those same issues.</p>
<p>I wasn&#8217;t entirely sold on responsive design then. I am now. I can now clearly see it as the way forward.</p>
<h3>The Way Forward</h3>
<p>Mark Boulton recently posted that <a href="http://www.markboulton.co.uk/journal/comments/the-difference-between-a-trend-and-a-shift">responsive design is s shift in how people design websites</a>.</p>
<p>He suggested that designers are still working out the details and eventually something else will come along leading to another shift, but this is the current path forward.</p>
<p>I completely agree. This is where web design is currently heading and if you ignore responsive design you stand a good chance of being left behind and designing sites that look out of date.</p>
<p><a href="http://artistsvalley.deviantart.com/art/Free-HTML-Document-Icon-82031218"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/html-document.jpg" alt="html document icon" width="465" height="465" /></a></p>
<h3>Is One HTML Document Enough?</h3>
<p>In his book Ethan mentions that responsive design is serving one html document to <a href="http://www.vanseodesign.com/css/cross-browser-css/">countless browsers</a> and devices to ensure the design is as portable as possible.</p>
<p>He also points out that not everyone agrees with this approach and their arguments mainly come down to 2 things.</p>
<ul>
<li>A device implies a context as different devices have different capabilities</li>
<li>Visitor priorities and goals differ in different contexts</li>
</ul>
<p>Because of the above some think serving different html documents to different devices is the better approach.</p>
<p>Both points above are important considerations, but they rest on assumptions that may or may not be true. Research suggests the most common use of mobile devices occurs in the home. The <a href="http://www.vanseodesign.com/web-design/framing-expectation-exposure-effect/">context</a> probably isn&#8217;t as different as some might assume.</p>
<p>Viewing on a <a href="http://www.vanseodesign.com/whatever/ipad-initial-thoughts/">tablet</a> likely doesn&#8217;t lead to significantly different goals and priorities than viewing in a browser, especially while leaning back on the couch. The context is probably more dependent on where a person is physically than the device used.</p>
<p>For some sites it will make sense to have a dedicated mobile version. For most it probably isn&#8217;t worth the extra effort and cost. Personally I think some of these changes in priority and context can be accounted for through responsive design.</p>
<p>I&#8217;m sure something will come along later that will be better, but I&#8217;m also sure this is the right path to walk right now. The technical details with improve and designers will find better ways to work with those details.</p>
<p>What might be <a href="http://www.zeldman.com/2011/07/06/responsive-design-i-dont-think-that-word-means-what-you-think-it-means/">even more important</a> where responsive design is concerned is the thought process and workflow it inspires.</p>
<p><a href="http://thehappybit.deviantart.com/art/Responsive-design-213822757"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/responsive-design.jpg" alt="Responsive website seen on iMac, iPad, and iPhone" width="465" height="349" /></a></p>
<h2>Developing a Responsive Workflow</h2>
<p>In his book Ethan walks through what he considers a good <a href="http://www.lukew.com/ff/entry.asp?1353">responsive workflow</a> and mentions the following.</p>
<ul>
<li><strong>Identify breakpoints</strong> &mdash;  Which devices are you designing for and what resolutions do they have?</li>
<li><strong>Prototyping</strong> &mdash;  Design changes for device and resolution will be harder to show with comped images so move things to the browser sooner. Create a prototype and then refine it in the browser.</li>
<li><strong>Mobile first</strong> &mdash; Decide what&#8217;s most important for your audience and serve only what&#8217;s needed to the least capable devices instead of hiding things for that device.</li>
<li><strong>Progressive enhancement</strong> &mdash;  &#8211; Scale your design up from the minimum instead of scaling it down from the maximum. Load content and code intelligently for each device and device characteristic</li>
</ul>
<h3>Identifying Breaking Points</h3>
<p>Last week when discussing media queries I closed with a question about the breaking points in our designs. Where should we set those breaking points and how many should we set.</p>
<p>I don&#8217;t think there&#8217;s a single answer to either question. It will come down to the specifics of your design, audience, etc. However we can look at the sizes of the common devices people use to consider good values for our breakpoints.</p>
<ul>
<li><strong>320 px</strong>&mdash; smart phones in portrait mode</li>
<li><strong>480 px</strong> &mdash; smart phones in landscape mode</li>
<li><strong>600 px</strong> &mdash; smaller tablets like the Kindle (600 x 800) or Nook (600 x 1024)</li>
<li><strong>768 px</strong> &mdash; tablet in portrait</li>
<li><strong>1024 px</strong> &mdash; tablet in landscape and netbooks</li>
<li><strong>1200 px</strong> &mdash; low end for widescreen displays</li>
<li><strong>1600 px</strong> &mdash; widescreen displays</li>
</ul>
<p>You wouldn&#8217;t set different media queries and css for each of the above, but you&#8217;d probably choose from the values above to set your own points of change.</p>
<p>The site <a href="http://mediaqueri.es/">Media Queries</a> (a great site for responsive design examples) recommends using <a href="http://mediaqueri.es/about/">4 breaking points</a> as screen shots when submitting your responsive design. 320px, 768px, 1024px, 1600px.</p>
<p>Again how many and which you use really comes down to the specifics of your project and design.</p>
<h3>Prototyping</h3>
<p>In recent years there&#8217;s been input from the design and development community in regards to our general workflow for building sites. A big part of the workflow has usually been designing comps with <a href="http://www.vanseodesign.com/web-design/pixel-perfect/">pixel perfection</a> in Photoshop, Fireworks, or similar. Many have begun to rethink that approach.</p>
<p>Remember we don&#8217;t have the constraint of the format to guide us. <a href="http://jasonsantamaria.com/articles/a-real-web-design-application/">Tools used to design for the web</a> need to be more flexible than their equivalents for print. You can&#8217;t see how a design responds in a single Photoshop comp.</p>
<p>Better is to take things to the browser sooner. Create a working prototype so you and clients can see how the design responds and keep iterating and refining.</p>
<p>That doesn&#8217;t mean we should ignore Photoshop or wireframing or anything else where we work solely in pixels. Instead it&#8217;s about moving to the browser as soon as possible.</p>
<p><p><a href="http://vimeo.com/22899835">MinneWebCon: Designing for Today&#8217;s Web</a> from <a href="http://vimeo.com/user6805669">ccemedia</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<h3>Mobile First</h3>
<p>The idea behind mobile first deserve its own post so understand what I&#8217;m saying here barely scratches the surface. The mobile first ideas come from Luke Wroblewski and below are two of his posts on the subject.</p>
<p>Above is a one of Luke&#8217;s presentations on mobile first. I&#8217;ve also included the PDF that goes with the presentation in the links below.</p>
<ul>
<li><a href="http://www.lukew.com/ff/entry.asp?933">Mobile First</a></li>
<li><a href="http://www.lukew.com/ff/entry.asp?1117">Mobile First Helps with Big Issues</a></li>
<li><a href="http://www.lukew.com/work/TodaysWeb_04112011.pdf">Today&#8217;s Web (PDF)</a></li>
</ul>
<p>We&#8217;re trained to think browser on computer first and then remove or hide things for different devices. This is really the opposite approach we should take. We should start where things <a href="http://www.vanseodesign.com/web-design/why-minimalism/">need to be more minimal</a>.</p>
<p>Mobile first forces us to think about what absolutely needs to be included in a design and to serve them to the least capable devices. We should be scaling things up instead of reducing them down.</p>
<h3>Progressive Enhancement</h3>
<p>A natural next step from mobile first is progressive enhancement.  Start with the minimum and build from there.</p>
<p>As part of this Ethan suggests our media queries should take on a slightly different form than how we&#8217;ve talked about them until now.</p>
<pre>
<span>/* default styles */</span>
	@media screen and (min-width: 320px)
<span>/* small screen */</span>
	@media screen and (min-width: 600px)
<span>/* desktop */</span>
	@media screen and (min-width: 1024px)
<span>/* wide screen */</span>
	@media screen and (min-width: 1200px)
</pre>
<p>Notice the change from max-width to min-width. Here we&#8217;re sending the least width the most necessary styles and from there building up as more can be included for wider screens.</p>
<p>We can also serve smaller devices smaller images and replace those images with larger versions as screen size increases. We might even choose to only add some content for wider screens and more capable devices.</p>
<p>Again much of this will come down to the specifics of your site and audience.</p>
<p>This overall approach is probably somewhat different than what most of you are used to. I know much of it is different for me. However it makes a lot of sense to approach web design this way and I&#8217;ve been slowly changing my own workflow.</p>
</p>
<h2>Summary</h2>
<p>Responsive design is something I think we all need to pay attention to. Mark Boulton is right. This is not a trend. It&#8217;s a <a href="http://adactio.com/journal/4367/">shift in web design thinking</a>.</p>
<p><a href="http://www.sitepoint.com/podcast-111-responsive-web-design-with-jeremy-keith/">Responsive design</a> takes a number of best practices like elastic layouts and progressive enhancement and combines them into a new way to think about and build websites.</p>
<p>Once again the basics of responsive design come down to:</p>
<ul>
<li>flexible layouts</li>
<li>flexible images</li>
<li>media queries</li>
</ul>
<p>None of the above is difficult. The hardest part will likely be changing your workflow and developing a responsive mindset.</p>
<p>I&#8217;m still learning to make these changes myself and I&#8217;m sure over time I&#8217;ll have more to say about everything we&#8217;ve been talking about these last few weeks.</p>
<p>Out of curiosity how many of you are currently building responsive sites or are looking to develop them? What have you found are their pros and cons? What have you found to be the easier and more difficult aspects of responsive design?</p>
<p><img src="http://www.vanseodesign.com/blog/?ak_action=api_record_view&amp;id=3074&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/OxuC_w4ToRXtSj4lJaOpO4FvIAo/0/da"><img src="http://feedads.g.doubleclick.net/~a/OxuC_w4ToRXtSj4lJaOpO4FvIAo/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/OxuC_w4ToRXtSj4lJaOpO4FvIAo/1/da"><img src="http://feedads.g.doubleclick.net/~a/OxuC_w4ToRXtSj4lJaOpO4FvIAo/1/di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/KWdsiqon2GI" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/thoughts-on-developing-a-responsive-design-workflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Does Your Audience Care About Design?</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/does-your-audience-care-about-design/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/does-your-audience-care-about-design/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 11:06:44 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[boilerplate]]></category>
		<category><![CDATA[design performance]]></category>
		<category><![CDATA[dvorak keyboard]]></category>
		<category><![CDATA[feed readers]]></category>
		<category><![CDATA[minimalist style]]></category>
		<category><![CDATA[qwerty keyboard]]></category>
		<category><![CDATA[reader button]]></category>
		<category><![CDATA[reading services]]></category>
		<category><![CDATA[style safari]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/does-your-audience-care-about-design/</guid>
		<description><![CDATA[You&#8217;re likely familiar with services like Readability and Instapaper that aim (in part) to make reading better by stripping away the boilerplate of a website and serving up the content in minimalist style. Safari users may be familiar with the Reader button that also strips away boilerplate and sometime in the fall iOS5 users will [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;re likely familiar with services like Readability and Instapaper that aim (in part) to make reading better by stripping away the boilerplate of a website and serving up the content in <a href="http://www.vanseodesign.com/web-design/why-minimalism/">minimalist style</a>.<br />
<span></span><br />
<img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/readability-instapaper-logos-3.png" alt="Readability and Instapaper logos" width="465" height="200" /></p>
<p>Safari users may be familiar with the Reader button that also strips away boilerplate and sometime in the fall iOS5 users will take that further with Reading List. You can add feed readers to the list of ways readers are absorbing content without design.</p>
<p>On the opposite end we have art direction, where pages are specifically designed based on the page copy, while still working with the overall <a href="http://www.vanseodesign.com/branding/brand-asset/">brand</a> of the site.</p>
<p>These things seem to be in opposition. One is adding design to content while the other is stripping it away.</p>
<p>As more people are turning to services like <a href="https://www.readability.com/">Readability</a> and <a href="http://www.instapaper.com/">Instapaper</a> some are drawing the conclusion that people don&#8217;t care about design. I disagree.</p>
<p>I want to talk about a couple of design principles that point toward people preferring design.</p>
<ul>
<li><strong>Performance vs. Preference</strong> &mdash; the idea that the designs that help people perform optimally are often not the same designs that people find most desirable</li>
<li><strong>Aesthetic-Usability Effect</strong> &mdash; the idea that aesthetic designs are perceived as easier to use than less-aesthetic designs</li>
</ul>
<p>After walking through these 2 principles I&#8217;ll bring the discussion back to art direction and design vs minimalist reading services.</p>
<p><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/dvorak.png" alt="Dvorak keyboard" width="465" height="155" /></p>
<h2>Performance vs. Preference</h2>
<p>The famous example of performance vs preference is the <a href="http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard">Dvorak keyboard</a> seen above.</p>
<p>Developed in the 1930s the Dvorak keyboard has been shown to increase typing efficiency by roughly 30%. If you ask most people if they&#8217;d like to type 30% faster with fewer errors they&#8217;d all say yes.</p>
<ul>
<li><strong>Qwerty keyboard</strong> &mdash; designed to prevent jamming of mechanical parts in typewriters</li>
<li><strong>Dvorak keyboard</strong> &mdash; designed to maximize typing efficiency</li>
</ul>
<p>Are you currently using a <a href="http://thestrategicfirm.wordpress.com/2009/08/14/preference-%E2%89%A0-performance/">Dvorak keyboard or the same qwerty keyboard</a> most everyone else uses?</p>
<p>One or two of you might use Dvorak, but my guess is most are using qwerty. It&#8217;s the keyboard we&#8217;re all familiar with. It&#8217;s the one that comes with every computer by default.</p>
<p>Switching now would mean retraining our fingers and relearning how to type. Even with the knowledge that Dvorak is the better keyboard are you planning on getting one? Probably not.</p>
<p>The	<a href="http://blog.vkistudios.com/index.cfm/2007/9/20/User-preference-vs-performance-Whats-more-important">reasons people prefer one design</a> over another are a combination of many factors, some of which have nothing to do with performance.</p>
<ul>
<li>Is it <a href="http://www.vanseodesign.com/web-design/meaningful-design-aesthetics/">aesthetically pleasing</a>?</li>
<li>Does it make me feel better?</li>
<li>Does it conform to my standard way of doing things?</li>
<li>Do I need to relearn something to use it?</li>
</ul>
<p>A better mousetrap isn&#8217;t necessarily the most popular mousetrap. When designing we need to consider as many factors as possible in regards to the preference of our audience. Better performance will play a role, likely a large one, but it isn&#8217;t the only factor. </p>
<p>To find out what people truly prefer we need to observe them interacting with our designs. What people say they want isn&#8217;t always what they really want. People are also generally poor at differentiating features they like from features that improve performance.</p>
<p>Think usability testing over focus groups.</p>
</p>
<h2>Aesthetic-Usability Effect</h2>
<p>In processing our visual surroundings we all form opinions and judgements that affect future <a href="http://www.vanseodesign.com/web-design/visual-perception-memory/">visual processing</a>. These quick and early perceptions are resistant to change and bias subsequent interactions.</p>
<p>Early visual impressions ultimately influence long-term use.</p>
<p>We also have a <a href="http://www.vanseodesign.com/web-design/faces-in-images/">bias toward attractive things</a>. We perceive attractive, aesthetically pleasing people and things more positively.</p>
<p>Because we feel more positive about an aesthetically pleasing design we find that design easier to use.</p>
<p>Whether or not the aesthetic design really is easier to use is irrelevant. We think it is and as a result we spend more times with it. We use it more and as a result learn to use it better.</p>
<p>In time the <a href="http://www.jnd.org/dn.mss/emotion_design_attractive_things_work_better.html">aesthetically pleasing design may really be more usable</a> because of our extra experience and knowledge using it.</p>
<p>On the other hand a more usable design that&#8217;s aesthetically unappealing can suffer from a lack of acceptance and use. If no one is using your usable design how usable is it?</p>
<p>Aesthetic designs result in a positive emotional response. They make people more tolerant of <a href="http://www.vanseodesign.com/web-design/minimize-errors-part-i/">mistakes and flaws</a> and problems with the design.</p>
<p>We should create more aesthetically pleasing designs because they</p>
<ul>
<li>are perceived as easier to use</li>
<li>are more readily accepted</li>
<li>are used more often over time</li>
<li>lead to more tolerance of design problems</li>
</ul>
<p>The feelings of affection we have for more aesthetically pleasing designs can lead to product and brand loyalty. They can promote creative thinking and problem solving. Aesthetics can even <a href="http://www.alistapart.com/articles/indefenseofeyecandy">communicate function</a>.</p>
<p>Negative feelings about a design do the opposite. The can stifle creativity and lead to narrow thinking. This is especially true in stressful environments and often leads to a reduction in performance.</p>
<p>Making things beautiful <a href="http://www.markboulton.co.uk/journal/comments/aesthetic-usability-effect">has a great impact in making them more usable</a>.</p>
<p><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/art-direction-explained.jpg" alt="Art Direction Explained book cover" width="465" height="531" /></p>
<h2>Art Direction vs Readability</h2>
<p><a href="http://blog.readability.com/2011/05/and-what-of-art-direction/">So what about art direction?</a> What about design? Are readers telling us they don&#8217;t care about aesthetics?</p>
<p>Services like Readability, Instapaper, and soon Reading List are gaining in popularity, however that doesn&#8217;t indicate that people don&#8217;t care about design. Reread the 2 principles described above and think about whether or not design is important.</p>
<p>Something doesn&#8217;t seem right. The <a href="http://www.vanseodesign.com/web-design/7-design-components/">design principles</a> above tell us people should should prefer reading designed content in a browser, but more and more seem to prefer reading in a way that bypasses the browser.</p>
<p>There are a couple of explanations for this seeming incongruity.</p>
<ul>
<li>Services like Instapaper and Readability make reading more convenient, which isn&#8217;t really a question of <a href="http://www.vanseodesign.com/web-design/visual-grammar/">visual design</a>. Part of the growing success of these services is they allow us to read content when we have more time to read it.</li>
<li>Where design is concerned most people have unfortunately been given poor design. The focus of the design of many sites is on anything but <a href="http://www.vanseodesign.com/marketing/content-strategy/">the content</a>. The focus is on the ads, the brand, the calls-to-action, everything but the content it seems.</li>
</ul>
<p>Consider how Readability presents content. It&#8217;s very well designed and quite beautiful in my opinion. Is it any wonder people choose it over reading many sites directly?</p>
<p>For designers the takeaway shouldn&#8217;t be that we need to strip away everything, though it&#8217;s probably a good start.</p>
<p>The takeaway should be that we need to create quality and aesthetically pleasing designs focused on what our audience wants, <a href="http://www.vanseodesign.com/web-design/is-content-necessary/">our content</a>.</p>
<p>Create a better reading environment and your audience will be happy to read inside your design. They&#8217;ll gladly use services to mark something to be read later and then click through to your site to do the reading.</p>
<p><a href="http://www.readability.com/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/readability-readinglist.png" alt="Readability readinglist" width="465" height="279" /></a></p>
<h2>Summary</h2>
<p>Design is important. It plays a large role in the success of any content, whether that content is an interesting article or sales copy to help sell a product.</p>
<p>With so much information online people are turning to services where they can read content later and often in a stripped down fashion. This isn&#8217;t a reaction to design. It&#8217;s a reaction to time constraints and bad design.</p>
<p>Principles like performance vs preference and the aesthetic-usability effect show us that design can have a great impact in what people prefer and in how easy a system is to use.</p>
<p>What we should be taking away from the popularity of Readability, Instapaper, and soon Reading List, isn&#8217;t that our visitors want less design. We should be realizing that they want more quality design.</p>
<p><img src="http://www.vanseodesign.com/blog/?ak_action=api_record_view&amp;id=3064&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/xZM-CfWxzbSWO5Sxof_p0Xc-T7o/0/da"><img src="http://feedads.g.doubleclick.net/~a/xZM-CfWxzbSWO5Sxof_p0Xc-T7o/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/xZM-CfWxzbSWO5Sxof_p0Xc-T7o/1/da"><img src="http://feedads.g.doubleclick.net/~a/xZM-CfWxzbSWO5Sxof_p0Xc-T7o/1/di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/nOuPlorLl94" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/does-your-audience-care-about-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Use Media Queries For Device Targeting</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-use-media-queries-for-device-targeting/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-use-media-queries-for-device-targeting/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 11:05:17 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[core css]]></category>
		<category><![CDATA[css rules]]></category>
		<category><![CDATA[device characteristics]]></category>
		<category><![CDATA[flexible images]]></category>
		<category><![CDATA[fluid images]]></category>
		<category><![CDATA[girds]]></category>
		<category><![CDATA[media queries]]></category>
		<category><![CDATA[responsive design]]></category>
		<category><![CDATA[responsive web]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-use-media-queries-for-device-targeting/</guid>
		<description><![CDATA[Media queries are a way to serve different css rules to different devices and device characteristics. They&#8217;re the final piece in allowing us to create designs that are truly responsive to our audience and how our visitors choose to view our sites. The last few weeks we&#8217;ve been building up toward responsive layouts, first by [...]]]></description>
			<content:encoded><![CDATA[<p>Media queries are a way to serve different css rules to different devices and device characteristics. They&#8217;re the final piece in allowing us to create designs that are truly responsive to our audience and how our visitors choose to view our sites.<br />
<span></span><br />
The last few weeks we&#8217;ve been building up toward responsive layouts, first by creating <a href="http://www.vanseodesign.com/css/elastic-layout-code/">flexible girds</a> and then by adding <a href="http://www.vanseodesign.com/css/flexible-images/">flexible images and media</a> inside those grids. Today we&#8217;ll add media queries to the mix.</p>
<p>All of these posts rely heavily on the work of Ethan Marcotte and so before getting started I want to point you again to some of Ethan&#8217;s writing on the subject.</p>
<ul>
<li><a href="http://www.alistapart.com/articles/responsive-web-design/">Responsive Web Design</a></li>
<li><a href="http://www.alistapart.com/d/responsive-web-design/ex/ex-site-flexible.html">Example Site for Responsive Design</a></li>
<li><a href="http://www.alistapart.com/articles/fluidgrids/">Fluid Grids</a></li>
<li><a href="http://unstoppablerobotninja.com/entry/fluid-images">Fluid Images</a></li>
<li><a href="http://www.abookapart.com/products/responsive-web-design">A Book Apart, Responsive Web Design</a></li>
</ul>
<p>I highly recommend the last link above, which is Ethan&#8217;s new book on responsive design. If you buy the digital version (PDF, ePub, and mobi) it&#8217;ll only set you back $9, which will be money well spent.</p>
<p><a href="http://resa.deviantart.com/art/urban-zombies-11-27751584"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/cell-phones-2.jpg" alt="Old mobile phones on a stack of advertisements" width="465" height="307" /></a></p>
<h2>Media Types</h2>
<p>As I mentioned above <a href="http://thinkvitamin.com/design/getting-started-and-gotchas-of-css-media-queries/">media queries</a> are a way to serve different css based on device and device characteristics.</p>
<p>For example we can send certain css to a browser on a laptop open 1200px wide and send different css to a mobile browser open to 480px and a third set of css to a tv screen displaying at 1024px.</p>
<p>We&#8217;ve actually been using a part of media queries for years, namely <a href="http://www.w3.org/TR/CSS21/media.html">media types</a> so let&#8217;s been there.</p>
<p>The html below should look familiar to you. We use it all the time to include a css file in an html document.</p>
<pre>
<span>&lt; link rel=<span>&quot;stylesheet&quot;</span> type=<span>&quot;text/css&quot;</span> href=<span>&quot;core.css&quot;</span>  media=<span>&quot;screen&quot;</span> / &gt;</span>
</pre>
<p>Note the media=&#8221;screen&#8221; at the end. That&#8217;s a media type. You may have written a print specific stylesheet at some point for which you&#8217;d use media=&#8221;print&#8221;</p>
<p>There are a variety of other media types you could use beyond screen and print.</p>
<ul>
<li><strong>all</strong> &mdash; for all the media types below</li>
<li><strong>braille</strong> &mdash; for braille tactile feedback devices</li>
<li><strong>embossed</strong> &mdash; for paged braille printers</li>
<li><strong>handheld</strong> &mdash; for handheld devices like mobile phones</li>
<li><strong>print</strong> &mdash; for printed material</li>
<li><strong>projection</strong> &mdash; for projected presentations</li>
<li><strong>screen</strong> &mdash; for <a href="http://www.vanseodesign.com/web-design/color-meaning/">color</a> computer screens</li>
<li><strong>speech</strong> &mdash; for speech synthesizers</li>
<li><strong>tty</strong> &mdash; for teletypes, terminals, and other devices with limited display capabilities</li>
<li><strong>tv</strong> &mdash;  for televisions and television like devices</li>
</ul>
<p>Media types are useful, but they aren&#8217;t enough. Not every device lists itself properly and realistically what works on one handheld device or tv might not work on another.</p>
<p>Enter media queries.</p>
<p><a href="http://www.vanseodesign.com/mediaqueri.es/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/media-queries.jpg" alt="Screen shot of Simon Collison's responsive design from MediaQueries.es" width="465" height="289" /></a></p>
<h2>Media Queries</h2>
<p>Building on top of media types the <a href="http://www.w3.org/TR/css3-mediaqueries/">W3C added media queries</a>. A simple media query looks like the following:</p>
<pre>
<span>@media screen and (max-width: 1200px) {</span>
	css here&#038;hellip
<span>}</span>
</pre>
<p>It begins with the media type (in this case screen) and is followed by the query as a feature: value pair. Here we&#8217;re targeting browsers with a max-width of 1200px</p>
<p>The type and the query are joined by the &#8220;and&#8221; operator. We&#8217;ll see in a bit that we can chain this operator to target very specific devices and characteristics</p>
<p>Above we started the media query with @media, but there are actually 3 ways to include <a href="http://css-tricks.com/css-media-queries/">media queries</a>.</p>
<ul>
<li><strong>@media</strong> which is added in your css file &mdash;  @media screen and (max-width: 1200px) {css here}</li>
<li>as part of <strong>html link element</strong> &mdash;  </li>
<li><strong>@import</strong> in .css &mdash;  @import url(&#8220;my-style.css&#8221;) screen and (max-width: 1200px)</li>
</ul>
<p>The @media method is probably the most common and it has the advantage of keeping all your css in a single css file. It&#8217;s likely what you&#8217;ll use most often in practice.</p>
<p>There are a baker&#8217;s dozen <a href="http://www.w3.org/TR/css3-mediaqueries/#media1">media features</a> you can use with media queries summarized in the table below.</p>
<table>
<tr>
<th width="30%">Feature</th>
<th width="40%">Definition</th>
<th width="30%">Accepts min/max?</th>
</tr>
<tr>
<td> width </td>
<td>width of display area/viewport</td>
<td>yes</td>
</tr>
<tr>
<td> height </td>
<td>height of display area/viewport</td>
<td>yes</td>
</tr>
<tr>
<td>device-width</td>
<td>width of device rendering surface</td>
<td>yes</td>
</tr>
<tr>
<td>device-height</td>
<td>height of device rendering surface</td>
<td>yes</td>
</tr>
<tr>
<td> orientation </td>
<td>portrait or landscape</td>
<td>no</td>
</tr>
<tr>
<td>aspect-ratio</td>
<td> ratio of display&#8217;s width to height (16:9, 4:3)</td>
<td>yes</td>
</tr>
<tr>
<td>device-aspect-ratio</td>
<td>ratio of device rendering surface width to height (16:9, 4:3)</td>
<td>yes</td>
</tr>
<tr>
<td> color </td>
<td>number of bits per color component of the output device</td>
<td>yes</td>
</tr>
<tr>
<td>color-index</td>
<td>number of entries in the color lookup table of the output device</td>
<td>yes</td>
</tr>
<tr>
<td>monochrome</td>
<td>number of bits per pixel in a monochrome frame buffer (0 for non-monochrome devices)</td>
<td>yes</td>
</tr>
<tr>
<td>resolution</td>
<td><a href="http://css-tricks.com/screen-resolution-notequalto-browser-window/">resolution</a> of the output device (pixel density; 72dpi, 300dpi)</td>
<td>yes</td>
</tr>
<tr>
<td>scan</td>
<td>progressive or scan for tv devices</td>
<td>no</td>
</tr>
<tr>
<td>grid</td>
<td><a href="http://www.vanseodesign.com/web-design/grid-anatomy/">grid</a> or bitmap (phone display with one fixed font; tty terminal)</td>
<td>no</td>
</tr>
</table>
<p>In the values above viewport is defined as the part of the screen/paper where the document is rendered and includes any scrollbar. The rendering surface defines the width of the screen.</p>
<p>Yeah, it&#8217;s confusing to me too. Typically though you&#8217;ll target the display area or viewport.</p>
<h3>Chaining Media Queries</h3>
<p>As I said above we can use the &#8220;and&#8221; operator to chain queries like so:</p>
<pre>
@media screen and (max-width: 1200px) and (orientation: landscape)
</pre>
<p>We can also use the &#8220;not&#8221; operator as in:</p>
<pre>
@media not projection and (max-width: 1200px)
</pre>
<p>to target devices other than projection with a max-with of 1200px. The &#8220;not&#8221; operator is evaluated last so the above is evaluated as:</p>
<pre>
@media not ( projection and (max-width: 1200px) )
</pre>
<p>There&#8217;s no specific &#8220;or&#8221; operator, but can imply &#8220;or&#8221; by using a comma.</p>
<pre>
@media screen and (min-width: 800px) and (orientation: landscape),
  @media screen and (max-width: 1200px)
</pre>
<p>The above would target both screens with a min-width of 800px in that are in landscape mode and screens with a max-width of 1200px.</p>
<p>The above queries aren&#8217;t necessarily those you would use in practice, but you can imagine how powerful and targeted this chaining can be.</p>
<h3>A New Meta Tag</h3>
<p>When Apple created mobile safari they also created a <a href="http://developer.apple.com/library/safari/#documentation/appleapplications/reference/SafariHTMLRef/Articles/MetaTags.html">new meta tag attribute</a> for it.</p>
<p>To display web pages mobile safari actually displays pages as they appear at 980px wide. It then shrinks down the page so it fits within the 320 x 480 display. The 980px is the viewport.</p>
<p>Other mobile browsers followed suit with the larger viewport and shrinking. We&#8217;d like things to be a little more consistent with the actual size of the device and fortunately we have the new meta tag.</p>
<pre>
<span>&lt;meta name=<span>&quot;viewport&quot;</span> content=<span>&quot;width=320&quot;</span> /&gt;</span>
</pre>
<p>Instead of setting an absolute viewport size we can be more flexible and set</p>
<pre>
<span>&lt;meta name=<span>&quot;viewport&quot;</span> content=<span>&quot;initial-scale=1.0, width=device-width&quot;</span> /&gt;</span>
</pre>
<p>The above basically sets the zoom level to 100%</p>
<p><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/02/browser-logos-30.jpg" alt="Collage of browser logos" width="465" height="475" /></p>
<h3>Browser Support</h3>
<p><a href="http://caniuse.com/#search=media">Browser support for media queries</a> is generally good, though as is often the case IE took awhile to catch up. Media queries are available in IE9, but for anything below we need to do a little extra to get them work.</p>
<p>There are some javascript libraries Ethan recommends we use.</p>
<ul>
<li><a href="http://code.google.com/p/css3-mediaqueries-js/">ss3-mediaqueries.js</a></li>
<li><a href="https://github.com/scottjehl/Respond">respond.js </a></li>
</ul>
<p>Both will add support for media queries to older browsers.</p>
<h2>Why Use Media Queries</h2>
<p>Even <a href="http://www.vanseodesign.com/css/elastic-layout-code/">flexible layouts</a> can bend or worse break. Flexible layouts can resize and accommodate a variety of width ranges, but they can still fail or simply look and work less than ideal above and below certain widths.</p>
<p>A different design might also be more effective on different devices. For example:</p>
<ul>
<li>Using 3 columns on a widescreen browser, 2 columns on a tablet, and a single column on a mobile phone.</li>
<li>Displaying different content to different devices. Not all would agree with this idea.</li>
<li>Changing the <a href="http://www.vanseodesign.com/web-design/size-scale-proportion/">proportions</a> within a design as the size of the viewport changes.</li>
<li>Reining in line lengths as the browser is opened wider.</li>
<li>Adding or removing <a href="http://www.vanseodesign.com/web-design/design-space/">whitespace</a> at different screen sizes.</li>
<li>Creating different <a href="http://www.vanseodesign.com/web-design/visual-hierarchy/">visual hierarchies</a> dependent on device and screen size.</li>
</ul>
<p>A variety of conditions beyond the above could lead us to modify our designs based on any of the devices or features we can target.</p>
<p>In the simple case of screen width a good choice is to allow our designs to be flexible throughout a range or widths and then modify the design for different sets of widths.</p>
<p>Of course this begs the question what ranges of widths should we use? What breaking points should we set? I&#8217;ll leave the question hanging until next week when we talk more about developing a responsive design workflow.</p>
<p><a href="http://www.apple.com/ipad/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2010/10/ipad-2.jpg" alt="iPad" width="465" height="313" /></a></p>
<h2>Summary</h2>
<p><a href="http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-a-crash-course-in-css-media-queries/">Media Queries</a> are a great way to target different devices and even better different characteristics of different devices. And the best part is they&#8217;re intuitive and relatively easy to use.</p>
<p>They take the form of media type and media query (as a feature: value pair) and through the ability to chain operators allow us to build powerful and highly targeted queries.</p>
<p>Through media queries we can set a variety of points over which our flexible layout might bend and serve different css to prevent those bends from breaking and causing problems for our visitors.</p>
<p>By combining <a href="http://www.vanseodesign.com/css/elastic-layout-code/">flexible layouts</a> and <a href="http://www.vanseodesign.com/css/flexible-images/">flexible images and other media</a> with media queries we have the ability to create designs that respond to the many different ways our audience might access and view our sites.</p>
<p>Next week we&#8217;ll take a look at responsive design and talk generally about how we should think about building a responsive workflow.</p>
<p><img src="http://www.vanseodesign.com/blog/?ak_action=api_record_view&amp;id=3048&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/AgbvXZxIT0O583WPbijdtGiXaJ0/0/da"><img src="http://feedads.g.doubleclick.net/~a/AgbvXZxIT0O583WPbijdtGiXaJ0/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/AgbvXZxIT0O583WPbijdtGiXaJ0/1/da"><img src="http://feedads.g.doubleclick.net/~a/AgbvXZxIT0O583WPbijdtGiXaJ0/1/di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/ZfXZphnNr5M" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-use-media-queries-for-device-targeting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>23 Books About Design You Ought To Read</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/23-books-about-design-you-ought-to-read-2/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/23-books-about-design-you-ought-to-read-2/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 10:56:21 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[basic design principles]]></category>
		<category><![CDATA[choosing a color scheme]]></category>
		<category><![CDATA[digital versions]]></category>
		<category><![CDATA[jim krause]]></category>
		<category><![CDATA[paperback copies]]></category>
		<category><![CDATA[principles of design]]></category>
		<category><![CDATA[robin williams]]></category>
		<category><![CDATA[typeface]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/23-books-about-design-you-ought-to-read-2/</guid>
		<description><![CDATA[I often mention how I read a lot of books and how much of what you read here came to me via one design book or another. Perhaps just as often someone asks me which books I&#8217;ve read and would recommend. It&#8217;s about time I mentioned some of them. I&#8217;ve been wanting to create a [...]]]></description>
			<content:encoded><![CDATA[<p>I often mention how I read a lot of books and how much of what you read here came to me via one design book or another. Perhaps just as often someone asks me which books I&#8217;ve read and would recommend. It&#8217;s about time I mentioned some of them.<br />
<span></span><br />
<img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/my-books2.jpg" height="349" /></p>
<p>I&#8217;ve been wanting to create a full book review section of the site where I could offer more complete reviews and provide as much detail as I can to help you decide. Since I haven&#8217;t yet gotten around to creating that section hopefully this post will suffice for now.</p>
<p><strong>Note:</strong> Below each book are links to Amazon and Barnes &amp; Noble. The B&amp;N links are affiliate links so if you buy I&#8217;ll make a couple of bucks. There are no affiliate links to the books on Amazon.</p>
<p>In most cases the prices are about the same at each store, though in a few cases the books at Amazon are significantly cheaper. While I&#8217;ve linked to the paperback copies some of these books also have digital versions.</p>
<h2>Design Basics</h2>
<p>The two books below are good as an introduction to design. They&#8217;re the first 2 books I read on the subject before I considered becoming a designer.</p>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780321534040&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThe-Non-Designers-Design-Book%2FRobin-Williams%2Fe%2F9780321534040&amp;usg=AFHzDLtD1QqbwaFeNQvAkcsvBDnQHL3rmA&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/26240000/26241175.JPG" alt="The Non-Designers Design Book" /></a></p>
<p><strong>The Non-Designers Design Book</strong><br />
by <em>Robin Williams</em></p>
<p>Just like the title says. If you&#8217;re a non-designer this is the book for you. My <a href="http://www.vanseodesign.com/web-design/basic-design-principles/">series of posts  on design basics</a> comes entirely from what I learned reading it.</p>
<p>The information here won&#8217;t make you the world&#8217;s greatest designer, but it will introduce you to some basic design principles that will take you from amateur designer and place you on the path to becoming a professional.</p>
<ul>
<li><a href="http://www.amazon.com/Non-Designers-Design-Book-Robin-Williams/dp/0321534042/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780321534040&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThe-Non-Designers-Design-Book%2FRobin-Williams%2Fe%2F9780321534040&amp;usg=AFHzDLtD1QqbwaFeNQvAkcsvBDnQHL3rmA&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781581805017U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDesign-Basics-Index%2FJim-Krause%2Fp%2F9781581805017&amp;usg=AFHzDLtrIjV0qsRgvqTZsxJ-gmdLKxucwA&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/14670000/14671633.JPG" alt="Design Basics Index" /></a></p>
<p><strong>Design Basic Index</strong><br />
by <em>Jim Krause</em></p>
<p>Jim Krause wrote a series of books to give practical information to designers. They&#8217;re meant to be able to look things up quickly. He has books on choosing a color scheme or finding a typeface in addition to this one.</p>
<p>Design Basic Index is filled with exercises and quick tips about different principles of design. It&#8217;s more in-depth in what it covers than the Non-Designers Design Book and will give you a good foundation for some the books mentioned below</p>
<ul>
<li><a href="http://www.amazon.com/Design-Basics-Index-Jim-Krause/dp/1581805012/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781581805017U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDesign-Basics-Index%2FJim-Krause%2Fp%2F9781581805017&amp;usg=AFHzDLtrIjV0qsRgvqTZsxJ-gmdLKxucwA&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<h2>Usability</h2>
<p>Both of the books below have become classics and each has a follow-up book on my future reading list.</p>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780321648785&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDont-Make-Me-Think%2FSteve-Krug%2Fe%2F9780321648785&amp;usg=AFHzDLuIkKDBy8KJPW6QtfJsoYuqFN88jw&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/65430000/65433392.JPG" alt="Don't Make Me Think" /></a></p>
<p><strong>Don&#8217;t Make Me Think</strong><br />
by <em>Steve Krug</em></p>
<p>Perhaps the bible of usability for non-usability experts. It focuses on web design and everything follows from a premise of not making your visitors think more than they have to in order to complete tasks.</p>
<p>It&#8217;s a quick read packed with information and lots of screenshot examples. Much of what&#8217;s in the book has now become common sense usability practice.</p>
<ul>
<li><a href="http://www.amazon.com/Dont-Make-Me-Think-Usability/dp/0321344758/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780321648785&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDont-Make-Me-Think%2FSteve-Krug%2Fe%2F9780321648785&amp;usg=AFHzDLuIkKDBy8KJPW6QtfJsoYuqFN88jw&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780465067107&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThe-Design-of-Everyday-Things%2FDon-Norman%2Fe%2F9780465067107&amp;usg=AFHzDLsKW0XfUhyWRX5eC2sOpzKY7kpOfQ&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/13770000/13779812.JPG" alt="The Design of Everyday Things" /></a></p>
<p><strong>The Design of Everyday Things</strong><br />
by <em>Donald Norman</em></p>
<p>This book is a little more in-depth about designing things to be usable. My <a href="http://www.vanseodesign.com/web-design/minimize-errors-part-i/">series of posts on minimizing errors</a> comes mainly from what&#8217;s written here.</p>
<p>Don Norman fills the book with plenty of real life stories of unusable and usable design that make the book enjoyable to read while sharing solid principles. After reading it you won&#8217;t look at ordinary objects quite the same way again.</p>
<ul>
<li><a href="http://www.amazon.com/Design-Everyday-Things-Donald-Norman/dp/0465067107/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780465067107&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThe-Design-of-Everyday-Things%2FDon-Norman%2Fe%2F9780465067107&amp;usg=AFHzDLsKW0XfUhyWRX5eC2sOpzKY7kpOfQ&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<h2>Design Principles and Design Elements</h2>
<p>Each of the books below focus on different design principles and/or working with design elements like lines and shapes. I&#8217;ve taken so many post ideas from the first book I couldn&#8217;t possibly list them all.</p>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592535873U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FUniversal-Principles-of-Design-Revised-and-Updated%2FWilliam-Lidwell%2Fp%2F9781592535873&amp;usg=AFHzDLtoyDZn15n6KBXvBDwnKJEvRC6cgA&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/46310000/46318427.JPG" alt="Universal Principles of Design" /></a></p>
<p><strong>Universal Principles of Design</strong><br />
by <em>William Lidwell, Kristina Holden, Jim Butler</em></p>
<p>This book is an attempt to begin a conversation about 125 different principles of design. Each principle is covered in a single page alongside a page of examples from the real world.</p>
<p>One of my favorite design books with all the different aspects it covers. The book isn&#8217;t about where to place a line or what shape to use to communicate something. Rather it deals with things like the psychology behind the attractiveness bias and Hick&#8217;s Law.</p>
<ul>
<li><a href="http://www.amazon.com/Universal-Principles-Design-Revised-Updated/dp/1592535879/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592535873U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FUniversal-Principles-of-Design-Revised-and-Updated%2FWilliam-Lidwell%2Fp%2F9781592535873&amp;usg=AFHzDLtoyDZn15n6KBXvBDwnKJEvRC6cgA&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592532612U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDesign-Elements%2FTimothy-Samara%2Fp%2F9781592532612&amp;usg=AFHzDLuGtEaOaQPmR26uDBQQGL2ygLxHzA&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/41790000/41793138.JPG" alt="Design Elements: A Graphic Style Manual" /></a></p>
<p><strong>Design Elements: A Graphic Style Manual</strong><br />
by <em>Timothy Samara</em></p>
<p>Design Elements walks through the different elements at a designer&#8217;s disposal, like form and space, point, line, surface, and volume, and then looks at both type and imagery.</p>
<p>My series of posts on <a href="http://www.vanseodesign.com/web-design/design-elements/">the elements of design</a> comes mainly from this book. It&#8217;s a great book for gaining a solid foundation of the different elements of design and how to go about using them.</p>
<ul>
<li><a href="http://www.amazon.com/Design-Elements-Graphic-Style-Manual/dp/1592532616/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592532612U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDesign-Elements%2FTimothy-Samara%2Fp%2F9781592532612&amp;usg=AFHzDLuGtEaOaQPmR26uDBQQGL2ygLxHzA&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781581157628&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThe-Elements-of-Graphic-Design%2FAlex-W-White%2Fe%2F9781581157628&amp;usg=AFHzDLvSMq66xCgV1PSO-O9RKgd4EpkfmQ&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/68250000/68252652.JPG" alt="The Elements of Graphic Design" /></a></p>
<p><strong>The Elements of Graphic Design</strong><br />
by <em>Alex White</em></p>
<p>This is a shorter book, but one packed with information. It covers many of the same topics as Design Elements above. Alex White has a unique take on things so you get a different perspective on a number of topics.</p>
<p>I learned quite a bit about working with space as well as working compositional balance into a design. My <a href="http://www.vanseodesign.com/web-design/7-design-components/">7 components of design series</a> was inspired by this book.</p>
<ul>
<li><a href="http://www.amazon.com/Elements-Graphic-Design-Second/dp/1581157622/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781581157628&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThe-Elements-of-Graphic-Design%2FAlex-W-White%2Fe%2F9781581157628&amp;usg=AFHzDLvSMq66xCgV1PSO-O9RKgd4EpkfmQ&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<h2>Visual Language</h2>
<p>These books on visual language are about what different visual elements communicate. The latter 2 look deeply at the subject and consider how we physically and psychologically see and perceive the objects around us.</p>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568985817&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FVisual-Grammar%2FChristian-Leborg%2Fe%2F9781568985817&amp;usg=AFHzDLv9h975IF5aUnjdp0kP-IM7oHX0VQ&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/39960000/39965676.JPG" alt="Visual Grammar" /></a></p>
<p><strong>Visual Grammar</strong><br />
by <em>Christian Leborg</em></p>
<p>This is a concise book that categorizes different visual objects and how they interact with each other. As the title implies it&#8217;s an attempt to create a visual grammar for the basic visual objects we use and their interactions with each other and with us.</p>
<p>My post on <a href="http://www.vanseodesign.com/web-design/visual-grammar/">visual grammar</a> comes from this book and I often referred to it while working on the elements of design series mentioned above.</p>
<ul>
<li><a href="http://www.amazon.com/Visual-Grammar-Design-Briefs-Christian/dp/1568985819/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568985817&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FVisual-Grammar%2FChristian-Leborg%2Fe%2F9781568985817&amp;usg=AFHzDLv9h975IF5aUnjdp0kP-IM7oHX0VQ&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780123708960&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FVisual-Thinking%2FColin-Ware%2Fe%2F9780123708960&amp;usg=AFHzDLvmgYPCfcC8bBHpcdNryGbzwC_zxw&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/25480000/25489654.JPG" alt="Visual Thinking for Design" /></a></p>
<p><strong>Visual Thinking for Design</strong><br />
by <em>Colin Ware</em></p>
<p>This is definitely not a quick read. It&#8217;s not a long book, but it gets very deep into things like how the eye works and how information is perceived and stored in memory.</p>
<p>There&#8217;s a good mix of theory and practical application on the subject of visual cognition.</p>
<p>This post on <a href="http://www.vanseodesign.com/web-design/verbal-visual-communication/">verbal and visual communication</a> comes mainly from this book, with a little help from the one below.</p>
<ul>
<li><a href="http://www.amazon.com/Visual-Thinking-Kaufmann-Interactive-Technologies/dp/0123708966/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780123708960&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FVisual-Thinking%2FColin-Ware%2Fe%2F9780123708960&amp;usg=AFHzDLvmgYPCfcC8bBHpcdNryGbzwC_zxw&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592535156&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FVisual-Language-for-Designers%2FConnie-Malamed%2Fe%2F9781592535156&amp;usg=AFHzDLufA_kNr1HokQw1UXTORjeSTz-NFw&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/36800000/36804066.JPG" alt="Visual Language for Designers" /></a></p>
<p><strong>Visual Language for Designers</strong><br />
by <em>Connie Malamed</em></p>
<p>This book is similar to the one above in terms of subject. I think it was a little easier to read as it placed a little more focus on the practical.</p>
<p>I read both back to back so they mix a little in mind as to what was in each. Both are good reads if you&#8217;re interested in learning about how we react to our visual surroundings.</p>
<p>Both aim to help you visually communicate abstract ideas and messages.</p>
<p>This post on <a href="http://www.vanseodesign.com/web-design/visual-perception-memory/">visual perception and memory</a> comes from this book, with a little help from the one above.</p>
<ul>
<li><a href="http://www.amazon.com/Visual-Language-Designers-Principles-Understand/dp/1592537413/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592535156&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FVisual-Language-for-Designers%2FConnie-Malamed%2Fe%2F9781592535156&amp;usg=AFHzDLufA_kNr1HokQw1UXTORjeSTz-NFw&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<h2>Typography</h2>
<p>I&#8217;ve mentioned a few times over the last year that I&#8217;ve been reading a lot about typography. The more I learn about type the more I realize how much more there is to know and how little I know the subject.</p>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780881792065&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FElements-of-Typographic-Style%2FRobert-Bringhurst%2Fe%2F9780881792065&amp;usg=AFHzDLsxcZUmcSLgtPbcUbPQKIn9O_MUpA&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/25120000/25120907.JPG" alt="The Elements of Typographic Style" /></a></p>
<p><strong>The Elements of Typographic Style</strong><br />
by <em>Robert Bringhurst</em></p>
<p>This is the modern bible of typography. I&#8217;d bet it&#8217;s on the shelf of every designer who&#8217;s ever been interested in the subject. It&#8217;s probably the first book most buy about typography.</p>
<p>Bringhurst is a poet and the writing within shows that. The book is filled with practical information such as when and how to use things like em dashes and en dashes. It closes with brief discussions of many different typefaces and type designers.</p>
<ul>
<li><a href="http://www.amazon.com/Elements-Typographic-Style-Robert-Bringhurst/dp/0881792063/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780881792065&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FElements-of-Typographic-Style%2FRobert-Bringhurst%2Fe%2F9780881792065&amp;usg=AFHzDLsxcZUmcSLgtPbcUbPQKIn9O_MUpA&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568989693&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThinking-with-Type%2FEllen-Lupton%2Fe%2F9781568989693&amp;usg=AFHzDLtsUW9ylsQ3AlqDB-G4MKFgYQx9dg&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/63840000/63847854.JPG" alt="Thinking with Type" /></a></p>
<p><strong>Thinking with Type</strong><br />
by <em>Ellen Lupton</em></p>
<p>Ellen Lupton&#8217;s book is divided into 3 sections, letter, text, and grid. Each section begins with an historical essay and then gets into more practical definitions of the subject.</p>
<p>The book is filled with visual examples of most everything discussed in the text, which helps to illustrate many of the principles.</p>
<ul>
<li><a href="http://www.amazon.com/Thinking-Type-2nd-revised-expanded/dp/1568989695/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568989693&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThinking-with-Type%2FEllen-Lupton%2Fe%2F9781568989693&amp;usg=AFHzDLtsUW9ylsQ3AlqDB-G4MKFgYQx9dg&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781581153842&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThinking-in-Type%2FAlex-W-White%2Fe%2F9781581153842&amp;usg=AFHzDLvzVjlcGyGlhVfagIYWY777Mr5eGQ&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/14990000/14993116.JPG" alt="Thinking in Type" /></a></p>
<p><strong>Thinking in Type</strong><br />
by <em>Alex White</em></p>
<p>Another book by Alex White. I bought this after enjoying the one mentioned above.</p>
<p>I like how Professor White comes at things from a different perspective at times giving me a new perspective in the process. For example this post on <a href="http://www.vanseodesign.com/web-design/display-text-type/">readability and legibility</a>.</p>
<p>This is another book filled with visual examples illustrating all of the concepts discussed.</p>
<ul>
<li><a href="http://www.amazon.com/Thinking-Type-Practical-Philosophy-Typography/dp/1581153848/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781581153842&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThinking-in-Type%2FAlex-W-White%2Fe%2F9781581153842&amp;usg=AFHzDLvzVjlcGyGlhVfagIYWY777Mr5eGQ&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780907259343&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDetail-in-Typography%2FJost-Hochuli%2Fe%2F9780907259343&amp;usg=AFHzDLtq9F22hDipZwoSr8-lofj0VGWIrQ&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/44100000/44108539.JPG" alt="Detail in Typography" /></a></p>
<p><strong>Detail in Typography</strong><br />
by <em>Jost Hochuli</em></p>
<p>A very short book and yet one filled with so much information it&#8217;s a must read. I&#8217;m still not sure how it managed to fit so much in to so few pages.</p>
<p>It starts by looking at individual letters and works its way out to words, lines, linespacing, and the quality of type. Lots of information about micro-typography. This book really gets into the details.</p>
<ul>
<li><a href="http://www.amazon.com/Detail-Typography-Jost-Hochuli/dp/0907259340/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780907259343&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDetail-in-Typography%2FJost-Hochuli%2Fe%2F9780907259343&amp;usg=AFHzDLtq9F22hDipZwoSr8-lofj0VGWIrQ&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780201703399U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FStop-Stealing-Sheep-Find-Out-How-Type-Works-Second-Edition%2FErik-Spiekermann%2Fp%2F9780201703399&amp;usg=AFHzDLvNirxgW6cC05TVXns1rX-n5H_b9w&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/14560000/14569332.JPG" alt="Stop Stealing Sheep and Find out How Type Works" /></a></p>
<p><strong>Stop Stealing Sheep and Find out How Type Works</strong><br />
by <em>Erik Spiekermann and E.M. Ginger</em></p>
<p>Every time I&#8217;ve seen Erik in a video online I&#8217;ve learned so much and reading this book was no different. A great introduction to typography and a very enjoyable read.</p>
<p>I recently read it after reading many of the other books in this section, but it&#8217;s probably a good first book on typography along with Bringhurst. There are fun and interesting stories in its pages as well as some great practical details about using type.</p>
<ul>
<li><a href="http://www.amazon.com/Stop-Stealing-Sheep-Find-Works/dp/0201703394/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780201703399U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FStop-Stealing-Sheep-Find-Out-How-Type-Works-Second-Edition%2FErik-Spiekermann%2Fp%2F9780201703399&amp;usg=AFHzDLvNirxgW6cC05TVXns1rX-n5H_b9w&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9782940373451&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FFundamentals-of-Typography%2FGavin-Ambrose%2Fe%2F9782940373451&amp;usg=AFHzDLvVcTWPrAnE3FEwzCVuRc9kyl3rXw&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/91890000/91894736.JPG" alt="The Fundamentals of Typography" /></a></p>
<p><strong>The Fundamentals of Typography</strong><br />
by <em>Gavin Ambrose and Paul Harris</em></p>
<p>One of the things I liked about this book was it&#8217;s first chapter which contains a walk through of type through history. Some of the other books here also cover typographic history, but I think this was first time it was connected for me along a timeline.</p>
<p>The rest of the topics are similar to many of the other books listed here. It likely works better as an introduction to typography than as a detailed text.</p>
<ul>
<li><a href="http://www.amazon.com/Fundamentals-Graphic-Design-Gavin-Ambrose/dp/2940373825/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9782940373451&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FFundamentals-of-Typography%2FGavin-Ambrose%2Fe%2F9782940373451&amp;usg=AFHzDLvVcTWPrAnE3FEwzCVuRc9kyl3rXw&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780471783909&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FTypographic-Design%2FRob-Carter%2Fe%2F9780471783909&amp;usg=AFHzDLsyB4NQuwgkTytEvPADA-uxyneMfw&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/14600000/14609088.JPG" alt="Typographic Design: Form and Communication" /></a></p>
<p><strong>Typographic Design: Form and Communication</strong><br />
by <em>Rob Carter, Ben Day, and Phillip Meggs</em></p>
<p>Another recent read for me. It also has a good historical perspective before jumping in to things like typographic anatomy, syntax, legibility, grids, and beyond.</p>
<p>There are plenty of topics discussed in the book. I also enjoyed the design of the book itself as well as many of the examples it uses. I think this is also one of those classic texts used in classrooms.</p>
<ul>
<li><a href="http://www.amazon.com/Typographic-Design-Communication-Rob-Carter/dp/0471783900/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780471783909&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FTypographic-Design%2FRob-Carter%2Fe%2F9780471783909&amp;usg=AFHzDLsyB4NQuwgkTytEvPADA-uxyneMfw&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p>Usually when writing about typography (such as the 2 posts below) I draw from several of the above books as many discuss the same topics, each with its own details and perspective.</p>
<ul>
<li><a href="http://www.vanseodesign.com/web-design/counterpart-and-counterpoint-in-typographic-hierarchy/">Counterpart and Counterpoint in Typographic Hierarchy</a></li>
<li><a href="http://www.vanseodesign.com/web-design/legible-readable-typography/">Legibility And Readability In Typographic Design</a></li>
</ul>
<h2>Grids</h2>
<p>Building on typography is the typographic grid, something I&#8217;m still trying my best to learn.</p>
<p>The first 3 books below are similar, which makes sense as they&#8217;re from the same author. Each is really a walkthrough of some ideas on grids and geometry along with student solutions to exercise problems. Each contains vellum overlays to show how certain designs were constructed.</p>
<p>I&#8217;ve come across reviews where people thought all 3 were more style than substance. I have to admit that at times reading each part of me felt the same. However in the end I enjoyed and learned from all 3 books.</p>
<p>If it means anything I did buy all 3 and have read through each more than once.</p>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568984650&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FGrid-Systems%2FKimberly-Elam%2Fe%2F9781568984650&amp;usg=AFHzDLtizRd3WnoEGkQB-MBZQS4U2oYu1w&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/39960000/39965292.JPG" alt="Grid Systems" /></a></p>
<p><strong>Grid Systems</strong><br />
by <em>Kimberly Elam</em></p>
<p>This book introduces some exercises and then shows student solutions to those exercises. The idea of each is to place different shapes (rectangles and circles) on the page in interesting ways.</p>
<p>Some shapes are representative of lines of blocks of text. Solutions with actual text instead of their representative shapes are also shown.</p>
<ul>
<li><a href="http://www.amazon.com/Grid-Systems-Principles-Organizing-Design/dp/1568984650/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568984650&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FGrid-Systems%2FKimberly-Elam%2Fe%2F9781568984650&amp;usg=AFHzDLtizRd3WnoEGkQB-MBZQS4U2oYu1w&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568982496&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FGeometry-of-Design%2FKimberly-Elam%2Fe%2F9781568982496&amp;usg=AFHzDLtWs7-zo0YLen8SexSbc_Of0vgauw&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/39960000/39964770.JPG" alt="Geometry of Design" /></a></p>
<p><strong>Geometry of Design</strong><br />
by <em>Kimberly Elam</em></p>
<p>This book discusses different geometric and mathematical systems like the <a href="http://www.vanseodesign.com/web-design/golden-section-proportions/">golden ratio</a>, for building grids.</p>
<p>It shows how to construct the different grid systems it discusses and shows them in practice in works of art and architecture. The idea is to help understand how different geometrical systems provide an aesthetic beauty to the works they&#8217;re used in.</p>
<ul>
<li><a href="http://www.amazon.com/Geometry-Design-Studies-Proportion-Composition/dp/1568982496/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568982496&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FGeometry-of-Design%2FKimberly-Elam%2Fe%2F9781568982496&amp;usg=AFHzDLtWs7-zo0YLen8SexSbc_Of0vgauw&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568986876&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FTypographic-Systems%2FKimberly-Elam%2Fe%2F9781568986876&amp;usg=AFHzDLulTQ_wtLcKtYjPkpMk5Pg238GZPQ&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/39960000/39965880.JPG" alt="Typographic Systems" /></a></p>
<p><strong>Typographic Systems</strong><br />
by <em>Kimberly Elam</em></p>
<p>This last once focuses on type, but I listed it here, because it deals with systems for organizing type on the page as opposed to typographic anatomy. Also it&#8217;s similar in form to the two other Kimberly Elam books above.</p>
<p>It works through 8 different systems for placing type on the page, including radial, grid, and modular systems.</p>
<p>One last word about this and the 2 books above. If you learn well through seeing abstract visuals you&#8217;ll probably like all 3. Each is less long text explanations and more quick intros with the visuals serving as the explanations.</p>
<ul>
<li><a href="http://www.amazon.com/Typographic-Systems-Design-Kimberly-Elam/dp/1568986874/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568986876&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FTypographic-Systems%2FKimberly-Elam%2Fe%2F9781568986876&amp;usg=AFHzDLulTQ_wtLcKtYjPkpMk5Pg238GZPQ&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592531257U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FMaking-and-Breaking-the-Grid%2FTimothy-Samara%2Fp%2F9781592531257&amp;usg=AFHzDLsWYRr9sA9QdHQpfPV-Od0FVlkOag&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/41790000/41793054.JPG" alt="Making and Breaking the Grid" /></a></p>
<p><strong>Making and Breaking the Grid</strong><br />
by <em>Timothy Samara</em></p>
<p>This book looks at designs that both use a grid and those that break out of it. I often pull it off the shelf just to look at the designs for inspiration. There are some absolutely beautiful examples inside.</p>
<p>Each of the two sections begins with a short intro followed by many examples of designs along with some explanation about how the design fits into a grid or breaks out of it. Each example also shows which grid is being used in the design.</p>
<p>The two post below were both taken directly from this book.</p>
<ul>
<li><a href="http://www.vanseodesign.com/web-design/grid-anatomy/">Anatomy of a Typographic Grid</a></li>
<li><a href="http://www.vanseodesign.com/web-design/grid-types/">4 Types of Grids And When Each Works Best</a></li>
</ul>
<ul>
<li><a href="http://www.amazon.com/Making-Breaking-Grid-Graphic-Workshop/dp/1592531253/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592531257U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FMaking-and-Breaking-the-Grid%2FTimothy-Samara%2Fp%2F9781592531257&amp;usg=AFHzDLsWYRr9sA9QdHQpfPV-Od0FVlkOag&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9782940373772&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FGrids%2FGavin-Ambrose%2Fe%2F9782940373772&amp;usg=AFHzDLvJLMSsEHib-VLGbBkkGdnqZuQTtg&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/91890000/91894760.JPG" alt="Basics Design: Grids" /></a></p>
<p><strong>Basics Design: Grids</strong><br />
by <em>Gavin Ambrose and Paul Harris</em></p>
<p>This book looks into different grid elements like baselines and columns as well as talking about different grid usage ideas. There are plenty of examples of grid based designs throughout.</p>
<p>I preferred Samara&#8217;s book to this one, but enjoyed both. The approach here is different than Making and Breaking the Grid. There are some different topics covered and it also has some great examples of grid based design.</p>
<ul>
<li><a href="http://www.amazon.com/Basics-Design-Grids-Gavin-Ambrose/dp/2940373779/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9782940373772&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FGrids%2FGavin-Ambrose%2Fe%2F9782940373772&amp;usg=AFHzDLvJLMSsEHib-VLGbBkkGdnqZuQTtg&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780321703538&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FOrdering-Disorder%2FKhoi-Vinh%2Fe%2F9780321703538&amp;usg=AFHzDLtjI0pciRos1rq6eHqL9whzNINUPw&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/99090000/99092331.JPG" alt="rdering Disorder: Grid Principles for Web Design" /></a></p>
<p><strong>Ordering Disorder: Grid Principles for Web Design</strong><br />
by <em>Khoi Vinh</em></p>
<p>Khoi Vinh&#8217;s book is the only one int his section that&#8217;s entirely focused on web design. Khoi is one of the people responsible for bringing a focus on grids to the online world.</p>
<p>This is a must read if you want to work with grids online. It helped answer a number of questions about how to develop a grid I had after reading the books above.</p>
<p>Khoi takes you through a working example constructing a basic grid and then developing several of the typical pages you&#8217;d find on any website using that grid.</p>
<p>If you had to pick 2 books from this section I&#8217;d go with Making and Breaking the Grid and this one.</p>
<ul>
<li><a href="http://www.amazon.com/Ordering-Disorder-Principles-Design-Voices/dp/0321703537/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780321703538&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FOrdering-Disorder%2FKhoi-Vinh%2Fe%2F9780321703538&amp;usg=AFHzDLtjI0pciRos1rq6eHqL9whzNINUPw&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<h2>Summary</h2>
<p>There are obviously a lot of books above (23 I hope) and you might be wondering which to read first. If I mentioned a book as a must read or a bible it&#8217;s probably one I would recommend first.</p>
<p>Otherwise visit Amazon or the Barnes &amp; Noble site and read some reviews or walk into a store and begin reading.</p>
<p>The majority of the books above I discovered through recommendations by other web designers. A few I found searching Amazon and a few I found searching the shelves at Barnes &amp; Noble.</p>
<p>I know some of these books are available as eBooks for iPad, Kindle, or Nook and they should offer free samples. I&#8217;d like to tell you that you&#8217;ll love all of them, but I know we all have different tastes in reading material.</p>
<p>I can tell you that these are all books on my many bookshelves and I&#8217;ve read each and every one, some several times, and I often grab them as references.</p>
<p>If you have any books to recommend about design please share. I&#8217;m always looking for new books to read.</p>
<p><img src="http://www.vanseodesign.com/blog/?ak_action=api_record_view&amp;id=3039&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/OXPTqK7-F3bkQMb8IJeA6eNQPWg/0/da"><img src="http://feedads.g.doubleclick.net/~a/OXPTqK7-F3bkQMb8IJeA6eNQPWg/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/OXPTqK7-F3bkQMb8IJeA6eNQPWg/1/da"><img src="http://feedads.g.doubleclick.net/~a/OXPTqK7-F3bkQMb8IJeA6eNQPWg/1/di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/9MGTdbWc1Pk" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/23-books-about-design-you-ought-to-read-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>23 Books About Design You Ought To Read</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/23-books-about-design-you-ought-to-read/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/23-books-about-design-you-ought-to-read/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 10:55:31 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[basic design principles]]></category>
		<category><![CDATA[choosing a color scheme]]></category>
		<category><![CDATA[digital versions]]></category>
		<category><![CDATA[jim krause]]></category>
		<category><![CDATA[paperback copies]]></category>
		<category><![CDATA[principles of design]]></category>
		<category><![CDATA[robin williams]]></category>
		<category><![CDATA[typeface]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/23-books-about-design-you-ought-to-read/</guid>
		<description><![CDATA[I often mention how I read a lot of books and how much of what you read here came to me via one design book or another. Perhaps just as often someone asks me which books I&#8217;ve read and would recommend. It&#8217;s about time I mentioned some of them. I&#8217;ve been wanting to create a [...]]]></description>
			<content:encoded><![CDATA[<p>I often mention how I read a lot of books and how much of what you read here came to me via one design book or another. Perhaps just as often someone asks me which books I&#8217;ve read and would recommend. It&#8217;s about time I mentioned some of them.<br />
<span></span><br />
<img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/my-books2.jpg" height="349" /></p>
<p>I&#8217;ve been wanting to create a full book review section of the site where I could offer more complete reviews and provide as much detail as I can to help you decide. Since I haven&#8217;t yet gotten around to creating that section hopefully this post will suffice for now.</p>
<p><strong>Note:</strong> Below each book are links to Amazon and Barnes &amp; Noble. The B&amp;N links are affiliate links so if you buy I&#8217;ll make a couple of bucks. There are no affiliate links to the books on Amazon.</p>
<p>In most cases the prices are about the same at each store, though in a few cases the books at Amazon are significantly cheaper. While I&#8217;ve linked to the paperback copies some of these books also have digital versions.</p>
<h2>Design Basics</h2>
<p>The two books below are good as an introduction to design. They&#8217;re the first 2 books I read on the subject before I considered becoming a designer.</p>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780321534040&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThe-Non-Designers-Design-Book%2FRobin-Williams%2Fe%2F9780321534040&amp;usg=AFHzDLtD1QqbwaFeNQvAkcsvBDnQHL3rmA&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/26240000/26241175.JPG" alt="The Non-Designers Design Book" /></a></p>
<p><strong>The Non-Designers Design Book</strong><br />
by <em>Robin Williams</em></p>
<p>Just like the title says. If you&#8217;re a non-designer this is the book for you. My <a href="http://www.vanseodesign.com/web-design/basic-design-principles/">series of posts  on design basics</a> comes entirely from what I learned reading it.</p>
<p>The information here won&#8217;t make you the world&#8217;s greatest designer, but it will introduce you to some basic design principles that will take you from amateur designer and place you on the path to becoming a professional.</p>
<ul>
<li><a href="http://www.amazon.com/Non-Designers-Design-Book-Robin-Williams/dp/0321534042/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780321534040&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThe-Non-Designers-Design-Book%2FRobin-Williams%2Fe%2F9780321534040&amp;usg=AFHzDLtD1QqbwaFeNQvAkcsvBDnQHL3rmA&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781581805017U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDesign-Basics-Index%2FJim-Krause%2Fp%2F9781581805017&amp;usg=AFHzDLtrIjV0qsRgvqTZsxJ-gmdLKxucwA&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/14670000/14671633.JPG" alt="Design Basics Index" /></a></p>
<p><strong>Design Basic Index</strong><br />
by <em>Jim Krause</em></p>
<p>Jim Krause wrote a series of books to give practical information to designers. They&#8217;re meant to be able to look things up quickly. He has books on choosing a color scheme or finding a typeface in addition to this one.</p>
<p>Design Basic Index is filled with exercises and quick tips about different principles of design. It&#8217;s more in-depth in what it covers than the Non-Designers Design Book and will give you a good foundation for some the books mentioned below</p>
<ul>
<li><a href="http://www.amazon.com/Design-Basics-Index-Jim-Krause/dp/1581805012/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781581805017U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDesign-Basics-Index%2FJim-Krause%2Fp%2F9781581805017&amp;usg=AFHzDLtrIjV0qsRgvqTZsxJ-gmdLKxucwA&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<h2>Usability</h2>
<p>Both of the books below have become classics and each has a follow-up book on my future reading list.</p>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780321648785&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDont-Make-Me-Think%2FSteve-Krug%2Fe%2F9780321648785&amp;usg=AFHzDLuIkKDBy8KJPW6QtfJsoYuqFN88jw&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/65430000/65433392.JPG" alt="Don't Make Me Think" /></a></p>
<p><strong>Don&#8217;t Make Me Think</strong><br />
by <em>Steve Krug</em></p>
<p>Perhaps the bible of usability for non-usability experts. It focuses on web design and everything follows from a premise of not making your visitors think more than they have to in order to complete tasks.</p>
<p>It&#8217;s a quick read packed with information and lots of screenshot examples. Much of what&#8217;s in the book has now become common sense usability practice.</p>
<ul>
<li><a href="http://www.amazon.com/Dont-Make-Me-Think-Usability/dp/0321344758/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780321648785&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDont-Make-Me-Think%2FSteve-Krug%2Fe%2F9780321648785&amp;usg=AFHzDLuIkKDBy8KJPW6QtfJsoYuqFN88jw&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780465067107&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThe-Design-of-Everyday-Things%2FDon-Norman%2Fe%2F9780465067107&amp;usg=AFHzDLsKW0XfUhyWRX5eC2sOpzKY7kpOfQ&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/13770000/13779812.JPG" alt="The Design of Everyday Things" /></a></p>
<p><strong>The Design of Everyday Things</strong><br />
by <em>Donald Norman</em></p>
<p>This book is a little more in-depth about designing things to be usable. My <a href="http://www.vanseodesign.com/web-design/minimize-errors-part-i/">series of posts on minimizing errors</a> comes mainly from what&#8217;s written here.</p>
<p>Don Norman fills the book with plenty of real life stories of unusable and usable design that make the book enjoyable to read while sharing solid principles. After reading it you won&#8217;t look at ordinary objects quite the same way again.</p>
<ul>
<li><a href="http://www.amazon.com/Design-Everyday-Things-Donald-Norman/dp/0465067107/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780465067107&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThe-Design-of-Everyday-Things%2FDon-Norman%2Fe%2F9780465067107&amp;usg=AFHzDLsKW0XfUhyWRX5eC2sOpzKY7kpOfQ&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<h2>Design Principles and Design Elements</h2>
<p>Each of the books below focus on different design principles and/or working with design elements like lines and shapes. I&#8217;ve taken so many post ideas from the first book I couldn&#8217;t possibly list them all.</p>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592535873U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FUniversal-Principles-of-Design-Revised-and-Updated%2FWilliam-Lidwell%2Fp%2F9781592535873&amp;usg=AFHzDLtoyDZn15n6KBXvBDwnKJEvRC6cgA&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/46310000/46318427.JPG" alt="Universal Principles of Design" /></a></p>
<p><strong>Universal Principles of Design</strong><br />
by <em>William Lidwell, Kristina Holden, Jim Butler</em></p>
<p>This book is an attempt to begin a conversation about 125 different principles of design. Each principle is covered in a single page alongside a page of examples from the real world.</p>
<p>One of my favorite design books with all the different aspects it covers. The book isn&#8217;t about where to place a line or what shape to use to communicate something. Rather it deals with things like the psychology behind the attractiveness bias and Hick&#8217;s Law.</p>
<ul>
<li><a href="http://www.amazon.com/Universal-Principles-Design-Revised-Updated/dp/1592535879/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592535873U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FUniversal-Principles-of-Design-Revised-and-Updated%2FWilliam-Lidwell%2Fp%2F9781592535873&amp;usg=AFHzDLtoyDZn15n6KBXvBDwnKJEvRC6cgA&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592532612U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDesign-Elements%2FTimothy-Samara%2Fp%2F9781592532612&amp;usg=AFHzDLuGtEaOaQPmR26uDBQQGL2ygLxHzA&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/41790000/41793138.JPG" alt="Design Elements: A Graphic Style Manual" /></a></p>
<p><strong>Design Elements: A Graphic Style Manual</strong><br />
by <em>Timothy Samara</em></p>
<p>Design Elements walks through the different elements at a designer&#8217;s disposal, like form and space, point, line, surface, and volume, and then looks at both type and imagery.</p>
<p>My series of posts on <a href="http://www.vanseodesign.com/web-design/design-elements/">the elements of design</a> comes mainly from this book. It&#8217;s a great book for gaining a solid foundation of the different elements of design and how to go about using them.</p>
<ul>
<li><a href="http://www.amazon.com/Design-Elements-Graphic-Style-Manual/dp/1592532616/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592532612U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDesign-Elements%2FTimothy-Samara%2Fp%2F9781592532612&amp;usg=AFHzDLuGtEaOaQPmR26uDBQQGL2ygLxHzA&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781581157628&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThe-Elements-of-Graphic-Design%2FAlex-W-White%2Fe%2F9781581157628&amp;usg=AFHzDLvSMq66xCgV1PSO-O9RKgd4EpkfmQ&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/68250000/68252652.JPG" alt="The Elements of Graphic Design" /></a></p>
<p><strong>The Elements of Graphic Design</strong><br />
by <em>Alex White</em></p>
<p>This is a shorter book, but one packed with information. It covers many of the same topics as Design Elements above. Alex White has a unique take on things so you get a different perspective on a number of topics.</p>
<p>I learned quite a bit about working with space as well as working compositional balance into a design. My <a href="http://www.vanseodesign.com/web-design/7-design-components/">7 components of design series</a> was inspired by this book.</p>
<ul>
<li><a href="http://www.amazon.com/Elements-Graphic-Design-Second/dp/1581157622/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781581157628&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThe-Elements-of-Graphic-Design%2FAlex-W-White%2Fe%2F9781581157628&amp;usg=AFHzDLvSMq66xCgV1PSO-O9RKgd4EpkfmQ&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<h2>Visual Language</h2>
<p>These books on visual language are about what different visual elements communicate. The latter 2 look deeply at the subject and consider how we physically and psychologically see and perceive the objects around us.</p>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568985817&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FVisual-Grammar%2FChristian-Leborg%2Fe%2F9781568985817&amp;usg=AFHzDLv9h975IF5aUnjdp0kP-IM7oHX0VQ&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/39960000/39965676.JPG" alt="Visual Grammar" /></a></p>
<p><strong>Visual Grammar</strong><br />
by <em>Christian Leborg</em></p>
<p>This is a concise book that categorizes different visual objects and how they interact with each other. As the title implies it&#8217;s an attempt to create a visual grammar for the basic visual objects we use and their interactions with each other and with us.</p>
<p>My post on <a href="http://www.vanseodesign.com/web-design/visual-grammar/">visual grammar</a> comes from this book and I often referred to it while working on the elements of design series mentioned above.</p>
<ul>
<li><a href="http://www.amazon.com/Visual-Grammar-Design-Briefs-Christian/dp/1568985819/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568985817&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FVisual-Grammar%2FChristian-Leborg%2Fe%2F9781568985817&amp;usg=AFHzDLv9h975IF5aUnjdp0kP-IM7oHX0VQ&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780123708960&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FVisual-Thinking%2FColin-Ware%2Fe%2F9780123708960&amp;usg=AFHzDLvmgYPCfcC8bBHpcdNryGbzwC_zxw&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/25480000/25489654.JPG" alt="Visual Thinking for Design" /></a></p>
<p><strong>Visual Thinking for Design</strong><br />
by <em>Colin Ware</em></p>
<p>This is definitely not a quick read. It&#8217;s not a long book, but it gets very deep into things like how the eye works and how information is perceived and stored in memory.</p>
<p>There&#8217;s a good mix of theory and practical application on the subject of visual cognition.</p>
<p>This post on <a href="http://www.vanseodesign.com/web-design/verbal-visual-communication/">verbal and visual communication</a> comes mainly from this book, with a little help from the one below.</p>
<ul>
<li><a href="http://www.amazon.com/Visual-Thinking-Kaufmann-Interactive-Technologies/dp/0123708966/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780123708960&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FVisual-Thinking%2FColin-Ware%2Fe%2F9780123708960&amp;usg=AFHzDLvmgYPCfcC8bBHpcdNryGbzwC_zxw&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592535156&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FVisual-Language-for-Designers%2FConnie-Malamed%2Fe%2F9781592535156&amp;usg=AFHzDLufA_kNr1HokQw1UXTORjeSTz-NFw&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/36800000/36804066.JPG" alt="Visual Language for Designers" /></a></p>
<p><strong>Visual Language for Designers</strong><br />
by <em>Connie Malamed</em></p>
<p>This book is similar to the one above in terms of subject. I think it was a little easier to read as it placed a little more focus on the practical.</p>
<p>I read both back to back so they mix a little in mind as to what was in each. Both are good reads if you&#8217;re interested in learning about how we react to our visual surroundings.</p>
<p>Both aim to help you visually communicate abstract ideas and messages.</p>
<p>This post on <a href="http://www.vanseodesign.com/web-design/visual-perception-memory/">visual perception and memory</a> comes from this book, with a little help from the one above.</p>
<ul>
<li><a href="http://www.amazon.com/Visual-Language-Designers-Principles-Understand/dp/1592537413/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592535156&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FVisual-Language-for-Designers%2FConnie-Malamed%2Fe%2F9781592535156&amp;usg=AFHzDLufA_kNr1HokQw1UXTORjeSTz-NFw&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<h2>Typography</h2>
<p>I&#8217;ve mentioned a few times over the last year that I&#8217;ve been reading a lot about typography. The more I learn about type the more I realize how much more there is to know and how little I know the subject.</p>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780881792065&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FElements-of-Typographic-Style%2FRobert-Bringhurst%2Fe%2F9780881792065&amp;usg=AFHzDLsxcZUmcSLgtPbcUbPQKIn9O_MUpA&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/25120000/25120907.JPG" alt="The Elements of Typographic Style" /></a></p>
<p><strong>The Elements of Typographic Style</strong><br />
by <em>Robert Bringhurst</em></p>
<p>This is the modern bible of typography. I&#8217;d bet it&#8217;s on the shelf of every designer who&#8217;s ever been interested in the subject. It&#8217;s probably the first book most buy about typography.</p>
<p>Bringhurst is a poet and the writing within shows that. The book is filled with practical information such as when and how to use things like em dashes and en dashes. It closes with brief discussions of many different typefaces and type designers.</p>
<ul>
<li><a href="http://www.amazon.com/Elements-Typographic-Style-Robert-Bringhurst/dp/0881792063/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780881792065&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FElements-of-Typographic-Style%2FRobert-Bringhurst%2Fe%2F9780881792065&amp;usg=AFHzDLsxcZUmcSLgtPbcUbPQKIn9O_MUpA&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568989693&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThinking-with-Type%2FEllen-Lupton%2Fe%2F9781568989693&amp;usg=AFHzDLtsUW9ylsQ3AlqDB-G4MKFgYQx9dg&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/63840000/63847854.JPG" alt="Thinking with Type" /></a></p>
<p><strong>Thinking with Type</strong><br />
by <em>Ellen Lupton</em></p>
<p>Ellen Lupton&#8217;s book is divided into 3 sections, letter, text, and grid. Each section begins with an historical essay and then gets into more practical definitions of the subject.</p>
<p>The book is filled with visual examples of most everything discussed in the text, which helps to illustrate many of the principles.</p>
<ul>
<li><a href="http://www.amazon.com/Thinking-Type-2nd-revised-expanded/dp/1568989695/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568989693&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThinking-with-Type%2FEllen-Lupton%2Fe%2F9781568989693&amp;usg=AFHzDLtsUW9ylsQ3AlqDB-G4MKFgYQx9dg&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781581153842&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThinking-in-Type%2FAlex-W-White%2Fe%2F9781581153842&amp;usg=AFHzDLvzVjlcGyGlhVfagIYWY777Mr5eGQ&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/14990000/14993116.JPG" alt="Thinking in Type" /></a></p>
<p><strong>Thinking in Type</strong><br />
by <em>Alex White</em></p>
<p>Another book by Alex White. I bought this after enjoying the one mentioned above.</p>
<p>I like how Professor White comes at things from a different perspective at times giving me a new perspective in the process. For example this post on <a href="http://www.vanseodesign.com/web-design/display-text-type/">readability and legibility</a>.</p>
<p>This is another book filled with visual examples illustrating all of the concepts discussed.</p>
<ul>
<li><a href="http://www.amazon.com/Thinking-Type-Practical-Philosophy-Typography/dp/1581153848/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781581153842&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FThinking-in-Type%2FAlex-W-White%2Fe%2F9781581153842&amp;usg=AFHzDLvzVjlcGyGlhVfagIYWY777Mr5eGQ&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780907259343&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDetail-in-Typography%2FJost-Hochuli%2Fe%2F9780907259343&amp;usg=AFHzDLtq9F22hDipZwoSr8-lofj0VGWIrQ&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/44100000/44108539.JPG" alt="Detail in Typography" /></a></p>
<p><strong>Detail in Typography</strong><br />
by <em>Jost Hochuli</em></p>
<p>A very short book and yet one filled with so much information it&#8217;s a must read. I&#8217;m still not sure how it managed to fit so much in to so few pages.</p>
<p>It starts by looking at individual letters and works its way out to words, lines, linespacing, and the quality of type. Lots of information about micro-typography. This book really gets into the details.</p>
<ul>
<li><a href="http://www.amazon.com/Detail-Typography-Jost-Hochuli/dp/0907259340/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780907259343&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FDetail-in-Typography%2FJost-Hochuli%2Fe%2F9780907259343&amp;usg=AFHzDLtq9F22hDipZwoSr8-lofj0VGWIrQ&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780201703399U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FStop-Stealing-Sheep-Find-Out-How-Type-Works-Second-Edition%2FErik-Spiekermann%2Fp%2F9780201703399&amp;usg=AFHzDLvNirxgW6cC05TVXns1rX-n5H_b9w&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/14560000/14569332.JPG" alt="Stop Stealing Sheep and Find out How Type Works" /></a></p>
<p><strong>Stop Stealing Sheep and Find out How Type Works</strong><br />
by <em>Erik Spiekermann and E.M. Ginger</em></p>
<p>Every time I&#8217;ve seen Erik in a video online I&#8217;ve learned so much and reading this book was no different. A great introduction to typography and a very enjoyable read.</p>
<p>I recently read it after reading many of the other books in this section, but it&#8217;s probably a good first book on typography along with Bringhurst. There are fun and interesting stories in its pages as well as some great practical details about using type.</p>
<ul>
<li><a href="http://www.amazon.com/Stop-Stealing-Sheep-Find-Works/dp/0201703394/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780201703399U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FStop-Stealing-Sheep-Find-Out-How-Type-Works-Second-Edition%2FErik-Spiekermann%2Fp%2F9780201703399&amp;usg=AFHzDLvNirxgW6cC05TVXns1rX-n5H_b9w&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9782940373451&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FFundamentals-of-Typography%2FGavin-Ambrose%2Fe%2F9782940373451&amp;usg=AFHzDLvVcTWPrAnE3FEwzCVuRc9kyl3rXw&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/91890000/91894736.JPG" alt="The Fundamentals of Typography" /></a></p>
<p><strong>The Fundamentals of Typography</strong><br />
by <em>Gavin Ambrose and Paul Harris</em></p>
<p>One of the things I liked about this book was it&#8217;s first chapter which contains a walk through of type through history. Some of the other books here also cover typographic history, but I think this was first time it was connected for me along a timeline.</p>
<p>The rest of the topics are similar to many of the other books listed here. It likely works better as an introduction to typography than as a detailed text.</p>
<ul>
<li><a href="http://www.amazon.com/Fundamentals-Graphic-Design-Gavin-Ambrose/dp/2940373825/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9782940373451&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FFundamentals-of-Typography%2FGavin-Ambrose%2Fe%2F9782940373451&amp;usg=AFHzDLvVcTWPrAnE3FEwzCVuRc9kyl3rXw&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780471783909&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FTypographic-Design%2FRob-Carter%2Fe%2F9780471783909&amp;usg=AFHzDLsyB4NQuwgkTytEvPADA-uxyneMfw&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/14600000/14609088.JPG" alt="Typographic Design: Form and Communication" /></a></p>
<p><strong>Typographic Design: Form and Communication</strong><br />
by <em>Rob Carter, Ben Day, and Phillip Meggs</em></p>
<p>Another recent read for me. It also has a good historical perspective before jumping in to things like typographic anatomy, syntax, legibility, grids, and beyond.</p>
<p>There are plenty of topics discussed in the book. I also enjoyed the design of the book itself as well as many of the examples it uses. I think this is also one of those classic texts used in classrooms.</p>
<ul>
<li><a href="http://www.amazon.com/Typographic-Design-Communication-Rob-Carter/dp/0471783900/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780471783909&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FTypographic-Design%2FRob-Carter%2Fe%2F9780471783909&amp;usg=AFHzDLsyB4NQuwgkTytEvPADA-uxyneMfw&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p>Usually when writing about typography (such as the 2 posts below) I draw from several of the above books as many discuss the same topics, each with its own details and perspective.</p>
<ul>
<li><a href="http://www.vanseodesign.com/web-design/counterpart-and-counterpoint-in-typographic-hierarchy/">Counterpart and Counterpoint in Typographic Hierarchy</a></li>
<li><a href="http://www.vanseodesign.com/web-design/legible-readable-typography/">Legibility And Readability In Typographic Design</a></li>
</ul>
<h2>Grids</h2>
<p>Building on typography is the typographic grid, something I&#8217;m still trying my best to learn.</p>
<p>The first 3 books below are similar, which makes sense as they&#8217;re from the same author. Each is really a walkthrough of some ideas on grids and geometry along with student solutions to exercise problems. Each contains vellum overlays to show how certain designs were constructed.</p>
<p>I&#8217;ve come across reviews where people thought all 3 were more style than substance. I have to admit that at times reading each part of me felt the same. However in the end I enjoyed and learned from all 3 books.</p>
<p>If it means anything I did buy all 3 and have read through each more than once.</p>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568984650&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FGrid-Systems%2FKimberly-Elam%2Fe%2F9781568984650&amp;usg=AFHzDLtizRd3WnoEGkQB-MBZQS4U2oYu1w&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/39960000/39965292.JPG" alt="Grid Systems" /></a></p>
<p><strong>Grid Systems</strong><br />
by <em>Kimberly Elam</em></p>
<p>This book introduces some exercises and then shows student solutions to those exercises. The idea of each is to place different shapes (rectangles and circles) on the page in interesting ways.</p>
<p>Some shapes are representative of lines of blocks of text. Solutions with actual text instead of their representative shapes are also shown.</p>
<ul>
<li><a href="http://www.amazon.com/Grid-Systems-Principles-Organizing-Design/dp/1568984650/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568984650&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FGrid-Systems%2FKimberly-Elam%2Fe%2F9781568984650&amp;usg=AFHzDLtizRd3WnoEGkQB-MBZQS4U2oYu1w&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568982496&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FGeometry-of-Design%2FKimberly-Elam%2Fe%2F9781568982496&amp;usg=AFHzDLtWs7-zo0YLen8SexSbc_Of0vgauw&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/39960000/39964770.JPG" alt="Geometry of Design" /></a></p>
<p><strong>Geometry of Design</strong><br />
by <em>Kimberly Elam</em></p>
<p>This book discusses different geometric and mathematical systems like the <a href="http://www.vanseodesign.com/web-design/golden-section-proportions/">golden ratio</a>, for building grids.</p>
<p>It shows how to construct the different grid systems it discusses and shows them in practice in works of art and architecture. The idea is to help understand how different geometrical systems provide an aesthetic beauty to the works they&#8217;re used in.</p>
<ul>
<li><a href="http://www.amazon.com/Geometry-Design-Studies-Proportion-Composition/dp/1568982496/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568982496&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FGeometry-of-Design%2FKimberly-Elam%2Fe%2F9781568982496&amp;usg=AFHzDLtWs7-zo0YLen8SexSbc_Of0vgauw&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568986876&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FTypographic-Systems%2FKimberly-Elam%2Fe%2F9781568986876&amp;usg=AFHzDLulTQ_wtLcKtYjPkpMk5Pg238GZPQ&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/39960000/39965880.JPG" alt="Typographic Systems" /></a></p>
<p><strong>Typographic Systems</strong><br />
by <em>Kimberly Elam</em></p>
<p>This last once focuses on type, but I listed it here, because it deals with systems for organizing type on the page as opposed to typographic anatomy. Also it&#8217;s similar in form to the two other Kimberly Elam books above.</p>
<p>It works through 8 different systems for placing type on the page, including radial, grid, and modular systems.</p>
<p>One last word about this and the 2 books above. If you learn well through seeing abstract visuals you&#8217;ll probably like all 3. Each is less long text explanations and more quick intros with the visuals serving as the explanations.</p>
<ul>
<li><a href="http://www.amazon.com/Typographic-Systems-Design-Kimberly-Elam/dp/1568986874/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781568986876&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FTypographic-Systems%2FKimberly-Elam%2Fe%2F9781568986876&amp;usg=AFHzDLulTQ_wtLcKtYjPkpMk5Pg238GZPQ&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592531257U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FMaking-and-Breaking-the-Grid%2FTimothy-Samara%2Fp%2F9781592531257&amp;usg=AFHzDLsWYRr9sA9QdHQpfPV-Od0FVlkOag&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/41790000/41793054.JPG" alt="Making and Breaking the Grid" /></a></p>
<p><strong>Making and Breaking the Grid</strong><br />
by <em>Timothy Samara</em></p>
<p>This book looks at designs that both use a grid and those that break out of it. I often pull it off the shelf just to look at the designs for inspiration. There are some absolutely beautiful examples inside.</p>
<p>Each of the two sections begins with a short intro followed by many examples of designs along with some explanation about how the design fits into a grid or breaks out of it. Each example also shows which grid is being used in the design.</p>
<p>The two post below were both taken directly from this book.</p>
<ul>
<li><a href="http://www.vanseodesign.com/web-design/grid-anatomy/">Anatomy of a Typographic Grid</a></li>
<li><a href="http://www.vanseodesign.com/web-design/grid-types/">4 Types of Grids And When Each Works Best</a></li>
</ul>
<ul>
<li><a href="http://www.amazon.com/Making-Breaking-Grid-Graphic-Workshop/dp/1592531253/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9781592531257U&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FMaking-and-Breaking-the-Grid%2FTimothy-Samara%2Fp%2F9781592531257&amp;usg=AFHzDLsWYRr9sA9QdHQpfPV-Od0FVlkOag&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9782940373772&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FGrids%2FGavin-Ambrose%2Fe%2F9782940373772&amp;usg=AFHzDLvJLMSsEHib-VLGbBkkGdnqZuQTtg&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/91890000/91894760.JPG" alt="Basics Design: Grids" /></a></p>
<p><strong>Basics Design: Grids</strong><br />
by <em>Gavin Ambrose and Paul Harris</em></p>
<p>This book looks into different grid elements like baselines and columns as well as talking about different grid usage ideas. There are plenty of examples of grid based designs throughout.</p>
<p>I preferred Samara&#8217;s book to this one, but enjoyed both. The approach here is different than Making and Breaking the Grid. There are some different topics covered and it also has some great examples of grid based design.</p>
<ul>
<li><a href="http://www.amazon.com/Basics-Design-Grids-Gavin-Ambrose/dp/2940373779/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9782940373772&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FGrids%2FGavin-Ambrose%2Fe%2F9782940373772&amp;usg=AFHzDLvJLMSsEHib-VLGbBkkGdnqZuQTtg&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<p><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780321703538&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FOrdering-Disorder%2FKhoi-Vinh%2Fe%2F9780321703538&amp;usg=AFHzDLtjI0pciRos1rq6eHqL9whzNINUPw&amp;pubid=21000000000284502"><img src="http://images.barnesandnoble.com/images/99090000/99092331.JPG" alt="rdering Disorder: Grid Principles for Web Design" /></a></p>
<p><strong>Ordering Disorder: Grid Principles for Web Design</strong><br />
by <em>Khoi Vinh</em></p>
<p>Khoi Vinh&#8217;s book is the only one int his section that&#8217;s entirely focused on web design. Khoi is one of the people responsible for bringing a focus on grids to the online world.</p>
<p>This is a must read if you want to work with grids online. It helped answer a number of questions about how to develop a grid I had after reading the books above.</p>
<p>Khoi takes you through a working example constructing a basic grid and then developing several of the typical pages you&#8217;d find on any website using that grid.</p>
<p>If you had to pick 2 books from this section I&#8217;d go with Making and Breaking the Grid and this one.</p>
<ul>
<li><a href="http://www.amazon.com/Ordering-Disorder-Principles-Design-Voices/dp/0321703537/">Amazon</a></li>
<li><a href="http://gan.doubleclick.net/gan_click?lid=41000000012871747&amp;pid=9780321703538&amp;adurl=http%3A%2F%2Fsearch.barnesandnoble.com%2FOrdering-Disorder%2FKhoi-Vinh%2Fe%2F9780321703538&amp;usg=AFHzDLtjI0pciRos1rq6eHqL9whzNINUPw&amp;pubid=21000000000284502">Barnes &amp; Noble</a></li>
</ul>
<h2>Summary</h2>
<p>There are obviously a lot of books above (23 I hope) and you might be wondering which to read first. If I mentioned a book as a must read or a bible it&#8217;s probably one I would recommend first.</p>
<p>Otherwise visit Amazon or the Barnes &amp; Noble site and read some reviews or walk into a store and begin reading.</p>
<p>The majority of the books above I discovered through recommendations by other web designers. A few I found searching Amazon and a few I found searching the shelves at Barnes &amp; Noble.</p>
<p>I know some of these books are available as eBooks for iPad, Kindle, or Nook and they should offer free samples. I&#8217;d like to tell you that you&#8217;ll love all of them, but I know we all have different tastes in reading material.</p>
<p>I can tell you that these are all books on my many bookshelves and I&#8217;ve read each and every one, some several times, and I often grab them as references.</p>
<p>If you have any books to recommend about design please share. I&#8217;m always looking for new books to read.</p>
<p><img src="http://www.vanseodesign.com/blog/?ak_action=api_record_view&amp;id=3039&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/OXPTqK7-F3bkQMb8IJeA6eNQPWg/0/da"><img src="http://feedads.g.doubleclick.net/~a/OXPTqK7-F3bkQMb8IJeA6eNQPWg/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/OXPTqK7-F3bkQMb8IJeA6eNQPWg/1/da"><img src="http://feedads.g.doubleclick.net/~a/OXPTqK7-F3bkQMb8IJeA6eNQPWg/1/di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/9MGTdbWc1Pk" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/23-books-about-design-you-ought-to-read/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Create Flexible Images And Media In CSS Layouts</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-create-flexible-images-and-media-in-css-layouts/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-create-flexible-images-and-media-in-css-layouts/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 10:53:02 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[absolute measurements]]></category>
		<category><![CDATA[default size]]></category>
		<category><![CDATA[flexible images]]></category>
		<category><![CDATA[flexible layout]]></category>
		<category><![CDATA[marcotte]]></category>
		<category><![CDATA[max width]]></category>
		<category><![CDATA[media queries]]></category>
		<category><![CDATA[responsive design]]></category>
		<category><![CDATA[richard rutter]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-create-flexible-images-and-media-in-css-layouts/</guid>
		<description><![CDATA[A flexible layout isn&#8217;t all that flexible if some of the component parts are fixed. Text easily reflows as it&#8217;s container resizes, but what about images and other media? How do we make them flexible to keep our layout flexible? Last week we talked about elastic layouts and flexible grids. Next week we&#8217;ll look at [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://www.vanseodesign.com/css/fluid-layout-code/">flexible layout</a> isn&#8217;t all that flexible if some of the component parts are fixed. Text easily reflows as it&#8217;s container resizes, but what about images and other media? How do we make them flexible to keep our layout flexible?<br />
<span></span><br />
Last week we talked about <a href="http://www.vanseodesign.com/css/elastic-layout-code/">elastic layouts and flexible grids</a>. Next week we&#8217;ll look at media queries. We&#8217;re building toward responsive layouts by discussing each of the 3 parts necessary for responsive design in a separate post.</p>
<p>All the credit here belongs to Ethan Marcotte and I recommend his post on <a href="http://unstoppablerobotninja.com/entry/fluid-images">flexible images</a>. I also highly recommend Ethan&#8217;s <a href="http://www.abookapart.com/products/responsive-web-design">new book on responsive design</a>.</p>
<p>Also Richard Rutter has set up a page <a href="http://clagnut.com/sandbox/imagetest3/">experimenting with flexible images using max-width</a> that&#8217;s worth checking out.</p>
<p><a href="http://www.flickr.com/photos/jenumfamily/5411462755/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/elastic-bands.jpg" alt="Elastic bands" width="465" height="281" /></a></p>
<h2>How to Create Flexible Images</h2>
<p>Typically when adding an image to a web page we set a width and height using absolute measurements like &#8216;px&#8217;. Unfortunately this fixes the image size and is completely inflexible.</p>
<p>At one specific point the absolutely fixed image is probably the perfect size. However in all other cases it will either be too large or too small for the layout. Let&#8217;s consider the case where the image is larger than its container.</p>
<p>We already know how to <a href="http://www.vanseodesign.com/css/hybrid-layout-code/">keep elements from growing too large</a> and that&#8217;s through the max-width property</p>
<pre>
<span>img {</span>
	max-width: 100%
<span>}</span>
</pre>
<p>And with that one line of code we&#8217;ll prevent our images from ever being larger than their containers. And since we&#8217;ve set the measurement in % the image can resize itself as its container resizes.</p>
<p>If an image is larger than it&#8217;s container it will be scaled back to be the same size as the container. If the image is smaller than the container the image will be its default size.</p>
<p>Modern browsers are good at maintaining <a href="http://www.vanseodesign.com/css/hybrid-layout-code/">proportions</a> so the image will resize well as the layout resizes. This works not only with images, but with video and other media. We can refine the above css to be:</p>
<pre>
<span>img, embed, object, video {</span>
	max-width: 100%
<span>}</span>
</pre>
<p>And we&#8217;re done. This is all seeming too easy isn&#8217;t it? Unfortunately we&#8217;re not there yet. The above doesn&#8217;t quite work everywhere.</p>
<p><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/internet-explorer-6-logo.jpg" alt="Internet Explorer 6 logo" width="465" height="333" /></p>
<h3>Internet Explorer 6</h3>
<p>First up is IE6, which probably isn&#8217;t any surprise. It may also not be much of a problem depending on your site. IE6 is finally falling out of use so it&#8217;s up to you whether or not it&#8217;s worth supporting.</p>
<p>IE6 doesn&#8217;t support max-width, but it treats the width property similar to max-width. The simple fix then is to use a <a href="http://www.vanseodesign.com/css/conditional-comments/">conditional comment</a> targeting IE6 and then set the width to 100%.</p>
<p>This will force all images to be the same size as the container. It works great if the image is larger than the container, but for images meant to be smaller like thumbnails and icons the images will scale up and usually not look too good.</p>
<p>We could go through the trouble of wrapping each of these smaller images inside its own container and set additional css on the containers, but that&#8217;s probably more work than it&#8217;s worth.</p>
<p>You can also apply a <a href="http://www.svendtofte.com/code/max_width_in_ie/">fix using Microsoft&#8217;s expression() property</a>, though it usually takes some trial and error to get the values you need correct.</p>
<p>For my part I&#8217;ve stopped developing for IE6 unless specifically requested and paid for by a client. On this site IE6 use has dropped to less than &amp;frac12;%</p>
<p><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/windows-logo.jpg" alt="Microsoft Windows logo" width="465" height="320" /></p>
<h3>Windows</h3>
<p>We&#8217;ve either taken care of IE6 or ignored it, but we&#8217;re still not done. Unfortunately Windows the platform doesn&#8217;t scale images as well as it could. Resized images can <a rel="lightbox" href="http://unstoppablerobotninja.com/demos/resize/ie-bug.png">look pretty bad</a> due to a bug in the operating system.</p>
<p>Fortunately while the issue is with the platform it only affects a few specific versions of browsers.</p>
<p>The browsers in question are Firefox 2, and IE 7 and below. The issue doesn&#8217;t affect other modern browsers. It also appears as though the bug has been fixed in IE7 so we&#8217;re actually down to IE6 and FF2 as browsers we need to find a workaround for.</p>
<p>The solution for IE6 (again should you choose to support it) is to use Microsoft&#8217;s <a href="http://msdn.microsoft.com/en-us/library/ms532969.aspx">AlphaImageLoader filter</a>.</p>
<p>You may be familiar with AlphaImageLoader since it&#8217;s also used in a fix for transparent .pngs on IE. Since it&#8217;s Microsoft specific though it won&#8217;t work with FF2.</p>
<p>I&#8217;m willing to concede that we probably don&#8217;t need to support FF2 and as I said above I&#8217;ve stopped supporting IE6 as well.</p>
<p>Odds are you probably aren&#8217;t going to support either of them so instead of presenting details of the fix here I&#8217;ll once again point you to <a href="http://unstoppablerobotninja.com/entry/fluid-images">Ethan&#8217;s post on flexible images</a>, which includes a javascript fix and a few more details about the issue and solution.</p>
<p><a href="http://www.flickr.com/photos/brenda-starr/5084917028/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/background.jpg" alt="Textured background image of beach" width="465" height="233" /></a></p>
<h2>Background Images</h2>
<p>We&#8217;re close, but still not all the way to having flexible images everywhere. If you&#8217;ve noticed we&#8217;ve been talking about images directly in your html so far. What about background images declared in your css?</p>
<h3>Vertically Repeated Images</h3>
<p>A couple of weeks ago I posted <a href="http://www.vanseodesign.com/css/equal-height-columns/">4 methods for creating equal height columns in css</a> and the first of those methods was faux columns. In that method we set a fixed width background image on a container div and repeated it vertically to mimic the background behind the individual columns.</p>
<p>While in that post we used a fixed width image, the method can be extended to be a little more flexible, if we&#8217;re willing to apply a little math.</p>
<p><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/05/faux-columns-background.png" alt="Faux columns background" width="465" height="20" /></p>
<p>Let&#8217;s use the image from the faux columns post (seen above) as an example. The image was 960px wide and transitioned at 340px from the left edge. First we&#8217;ll use the hopefully familiar formula we used to create elastic grids.</p>
<p>target &#038;divide context = result</p>
<p>340px &divide; 960px = 35.4167%</p>
<p>Now we know where our transition point is located relative to the edge.</p>
<p>Next we&#8217;ll create a much larger background image than we&#8217;ll reasonably need and once again do the math in reverse to determine where we need to set that transition point.</p>
<p>Let&#8217;s create an image that&#8217;s 3000px wide.</p>
<p>target &divide; 3000px = 35.4167%</p>
<p>Doing the math our target becomes 1062.5 px. Since we need to use integer values in Photoshop we&#8217;ll round up to 1063 px.</p>
<p>Finally we&#8217;ll set the image using the css <a href="http://www.vanseodesign.com/css/css-background-property/">background-position property</a>.</p>
<pre>
<span>background</span><span>:</span><span> url(<span>"background-image.png"</span>) repeat-y 35.4167% 0</span><span>;</span>
</pre>
<p>Our image can now scale with our layout while our transition point will always remain where we want.</p>
<p>The above works for vertically repeating background images, but it&#8217;s not truly flexible in the sense that we&#8217;ve created a fixed width image, just one much larger than we think we&#8217;ll ever need.</p>
<p>We&#8217;ll be ok as long as the layout doesn&#8217;t get wider than the image, but that may not always be the case.</p>
<h3>Horizontally Repeating Images</h3>
<p>If you have a small image that you&#8217;re using as a repeating background there shouldn&#8217;t be any issue. The image will repeat to fill up its container regardless of size.</p>
<p>Assuming the image is small enough horizontally or represents something that only changes vertically (think gradient on a navigation bar),  the worst case is being off a couple of px at the edge, which is unlikely to be noticed by most.</p>
<h3>Background-Size</h3>
<p>CSS3 has a property called <a href="http://www.w3.org/TR/css3-background/#the-background-size">background-size</a>, which would be perfect, but at the moment it&#8217;s not supported well enough to use in practice.</p>
<p>Next week we&#8217;ll talk about media queries, which will let us set different images over a range of layout widths. In time the combination of media queries and background-size will be our solution, but sadly not today.</p>
<p><a href="http://www.flickr.com/photos/flashcurd/3225143674/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/overflow-2.jpg" alt="Overflow at derwent reservoir" width="465" height="309" /></a></p>
<h2>Hiding Images with Overflow</h2>
<p>Much of the time max-width alone will be enough to keep your layouts flexible. At times though your images won&#8217;t <a href="http://www.vanseodesign.com/web-design/size-scale-proportion/">scale</a> well because of the content of the image or perhaps it&#8217;s not really necessary to always show the entire image.</p>
<p>If we set overflow: hidden on a container around an image then as the container is resized smaller than the image, part of the image will be hidden. The image won&#8217;t be flexible, but it will preserve the integrity of your layout and allow it to remain flexible.</p>
<p>Most of the time max-width will be the better option, but depending on the content in the image it may also be ok to hide it instead of resizing it.</p>
<h2>Image Replacement</h2>
<p>There&#8217;s one last method which involves replacing images that might be useful when your image is complex enough that scaling it doesn&#8217;t work well and where hiding part of the image isn&#8217;t an option.</p>
<p>The solution is to use multiple images and serve different sized images under different conditions.</p>
<p>This is a server side method and instead of presenting it incorrectly here I&#8217;ll direct you to a post by Bryan Rieger on <a href="http://bryanrieger.com/issues/mobile-image-replacement/">mobile image replacement</a> with the details and even better a download with all the code you need.</p>
<p>Next week we&#8217;ll dive into media queries which also allow you to serve different images based on device and screen width among other things.</p>
<p><a href="http://notasitis.deviantart.com/art/Elastic-colours-5526432"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/elastic-colours.jpg" alt="Colorful elastic bands" width="465" height="346" /></a></p>
<h2>Summary</h2>
<p>Being able to create flexible images is an important consideration when trying to create a flexible layout. What good is a <a href="http://www.vanseodesign.com/css/fluid-layout-code/">flexible layout</a> if the content inside forces the layout to be rigid?</p>
<p>For most cases all we need to do is set a max-width of 100% on our images (and media) to make them flexible. You&#8217;ll need a couple of fixes for IE6 and one for FF2 should you decide you need to support those browsers.</p>
<p>With vertically repeating background images we&#8217;ll create much larger images than necessary and use a little math to understand where to set transition points on the background-position property.</p>
<p>At times we can apply an overflow: hidden fix that will preserve the flexibility of our layout even if they don&#8217;t make our images any more flexible.</p>
<p>In time we&#8217;ll have browser support for the css3 background-resize property, but for now max-width: 100% and overflow: hidden should cover most cases.</p>
<p>Even with all of the above methods we don&#8217;t have a way to create flexible images 100% of the time. We are able to cover most practical cases and perhaps rethink our use of images in those few cases we can&#8217;t yet cover.</p>
<p>Next week we&#8217;ll continue with a discussion of media queries before wrapping up with some thoughts about responsive design.</p>
<p><img src="http://www.vanseodesign.com/blog/?ak_action=api_record_view&amp;id=3022&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/YTw6FQmMlp40XO6J8B4q95CVepM/0/da"><img src="http://feedads.g.doubleclick.net/~a/YTw6FQmMlp40XO6J8B4q95CVepM/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/YTw6FQmMlp40XO6J8B4q95CVepM/1/da"><img src="http://feedads.g.doubleclick.net/~a/YTw6FQmMlp40XO6J8B4q95CVepM/1/di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/wLd5dCZ8FIg" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-create-flexible-images-and-media-in-css-layouts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is Content Necessary Prior To Web Design?</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/is-content-necessary-prior-to-web-design/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/is-content-necessary-prior-to-web-design/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 10:51:56 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[3 years]]></category>
		<category><![CDATA[Art Direction]]></category>
		<category><![CDATA[content design]]></category>
		<category><![CDATA[different designs]]></category>
		<category><![CDATA[feature images]]></category>
		<category><![CDATA[Luke Wroblewski]]></category>
		<category><![CDATA[single design]]></category>
		<category><![CDATA[Tweet]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/is-content-necessary-prior-to-web-design/</guid>
		<description><![CDATA[The above is a tweet from about 3 years ago that recently came to my attention via Luke Wroblewski. It&#8217;s hardly controversial, however, I think the quote above can be taken too literally. I want to offer a few thoughts about what we really need to know about content in order to begin developing a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://twitter.com/#!/zeldman/statuses/804159148"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/zeldman-tweet.png" alt="Content precedes design. Design in the absence of content is not design, it's decoration" width="465" height="208" /></a></p>
<p>The above is a tweet from about 3 years ago that recently came to my attention <a href="http://www.lukew.com/ff/entry.asp?1311">via Luke Wroblewski</a>. It&#8217;s hardly controversial, however, I think the quote above can be taken too literally.<br />
<span></span><br />
I want to offer a few thoughts about what we really need to know about content in order to begin developing a <a href="http://www.vanseodesign.com/web-design/web-design-harmony-concept-conveyance-and-theme/">design concept</a>.</p>
<p>First let me state I absolutely agree with the meaning behind Jeffrey&#8217;s statement and I think he too would agree his words are sometimes taken too literally. He said as much in a <a href="http://www.zeldman.com/2008/05/06/content-precedes-design/#comment-36870">comment on his blog</a>.</p>
<blockquote><p>&#8220;Content&#8221; doesn’t mean “having all the copy.</p>
</blockquote>
<p>I&#8217;m sure when you&#8217;re about to start a project for a client you ask early on for the content. If your clients are like many of mine you won&#8217;t get all the copy prior to starting the design and you&#8217;ll need to <a href="http://www.vanseodesign.com/online-business/8-tips-information-clients/">get more information from them</a>.</p>
<p>Is it really necessary?</p>
<p><a href="http://www.flickr.com/photos/twylo/2526215746/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2010/09/typewriter-2.jpg" width="465" height="349" /></a></p>
<h2>What You Need to Know About Content</h2>
<p><a href="http://www.vanseodesign.com/web-design/visual-grammar/">Design is communication</a>. Naturally we need to know what we&#8217;re trying to communicate in order to be able to communicate it effectively.</p>
<p>This is key to design.</p>
<p>Ideally we&#8217;ll have <a href="http://www.usabilitypost.com/2011/04/16/architecture-v-web-design/">real content to work with</a>. I&#8217;ll always ask for it and hope to get it as soon as possible. Realistically it almost never happens.</p>
<p>When you design specifically around prewritten content you have art direction. You have different designs for each piece of content.</p>
<p>While you may be art directing the content on a site, most of the time we&#8217;re creating a single design or several similar designs for different sections of the site.</p>
<p>Think about how you would design a blog. You can&#8217;t possibly have all the content in advance, because most of it won&#8217;t even be an idea as you&#8217;re designing. The very nature of a blog suggests the design has to come before most of the copy.</p>
<p>You can know in advance that future blogs posts will mostly be text heavy or that they&#8217;ll feature images or other media in some way. You should also know what the topic of the blog is.</p>
<p>Your design can know much about what that content will be long before the content is created. You may not be able to design a post specifically around its content, but you&#8217;ll have enough information to come up with a design for the blog as a whole.</p>
<p>We don&#8217;t need all the copy in advance. What we need to know is information about what that copy will be. We need to know things like:</p>
<ul>
<li>What is the site is about?</li>
<li><a href="http://www.vanseodesign.com/seo/silos/">What will the content be about?</a></li>
<li>What type of content will be present (text, images, video, audio, etc)?</li>
<li>Who is the audience for the content?</li>
<li>Will the content be short, medium, or long form?</li>
<li>How will people <a href="http://www.vanseodesign.com/seo/ia-search-engines/">find the content?</a></li>
</ul>
<p>What we need isn&#8217;t so much the exact copy as it is knowing the subject of the copy and associated information. We need a strong understanding of the nature of the content, but not the content itself.</p>
<p>The more information you have about the content prior to design, the more likely the design can turn out well, but again you don&#8217;t need to have the exact copy in order to design.</p>
<p>Not having all the copy doesn&#8217;t mean you know nothing about the content.</p>
<p><a href="http://fuzzys.deviantart.com/art/you-are-here-sitemap-mock-up-92099"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/sitemap.jpg" alt="Sitemap mockup for fictional project on Kuala Lumpur" width="465" height="349" /></a></p>
<h2>Planning Content</h2>
<p>Knowing that we need some information about content, we need to at the very least set a plan for what the content will be. What should we plan for before design in order to be able to design effectively?</p>
<p>Ideally we&#8217;ll have a <a href="http://www.vanseodesign.com/marketing/content-strategy/">content strategy</a> in place to define the purpose of the content and set out what the message we&#8217;re trying to communicate will be.</p>
<p>We want to plan for <a href="http://www.vanseodesign.com/web-design/inspiration-ideas/">topics and ideas</a> and how the content will relate to achieving site and business goals, marketing, and search engine optimization.</p>
<p>We want our content strategy to answer questions like:</p>
<ul>
<li><strong>What</strong> content should be created</li>
<li><strong>Why</strong> create this content</li>
<li><strong>Who</strong> is the best person to create this content</li>
<li><strong>Where</strong> will this content be put to best use</li>
<li><strong>When</strong> should this content be published</li>
<li><strong>How</strong> will this content be created, text, image, video, etc.</li>
</ul>
<p>Before designing  we need to develop the <a href="http://www.vanseodesign.com/web-design/4-principles-information-architecture/">information architecture</a> for the site in order to design site navigation, help search engines find the content and help them understand it too.</p>
<p>When I&#8217;m entrusted with developing a content plan <a href="http://www.vanseodesign.com/web-design/structuring-content/">my process for content creation</a> is to research the industry, brainstorm ideas, organize the potential pages, prune those pages, and revise by iterating the entire process again.</p>
<p>I&#8217;ve written in more detail about most of the above and have linked to those details throughout this post. The important thing to understand here is that planning content prior to design is not only important, but a requirement for effective design.</p>
<p>Do we need all the copy prewritten? No, but we do need to know as much as possible about what that copy will eventually be.</p>
<p><a href="http://www.flickr.com/photos/renaissancechambara/5138136416/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/multimedia.jpg" alt="Cartoon image of a variety of multimedia devices" width="465" height="349" /></a></p>
<h2>Summary</h2>
<p>I realize I&#8217;m not saying anything new or profound here. This post is more a reminder that while you don&#8217;t need to have every bit of copy in order to create a design, you do need to have a lot of questions answered about the what the content will be.</p>
<p>It&#8217;s also a reminder that while most clients won&#8217;t ever deliver all the copy prior to you beginning the design that&#8217;s ok. You don&#8217;t need it.</p>
<p>Design in the absence of copy can still be design. Design in the absence of any knowledge of content is certainly decoration. Seldom though, do we have absolutely no knowledge about content.</p>
<p>We may not have all the details, but we almost always have some information about what the content will be, usually enough to <a href="http://www.vanseodesign.com/web-design/design-concept-thoughts/">develop a concept for the design</a>, plan the site architecture, etc.</p>
<p>Do you insist on all the copy prior to designing? What information do you require at a minimum?</p>
<p><img src="http://www.vanseodesign.com/blog/?ak_action=api_record_view&amp;id=3008&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/HV8oBHeCM8QgGEx5B_AQHIVfx1c/0/da"><img src="http://feedads.g.doubleclick.net/~a/HV8oBHeCM8QgGEx5B_AQHIVfx1c/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/HV8oBHeCM8QgGEx5B_AQHIVfx1c/1/da"><img src="http://feedads.g.doubleclick.net/~a/HV8oBHeCM8QgGEx5B_AQHIVfx1c/1/di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/VqE2diSw8ic" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/is-content-necessary-prior-to-web-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Develop Elastic Grid Layouts In CSS</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-elastic-grid-layouts-in-css/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-elastic-grid-layouts-in-css/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 10:50:40 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[absolute measurements]]></category>
		<category><![CDATA[div id]]></category>
		<category><![CDATA[flexible layout]]></category>
		<category><![CDATA[flexible layouts]]></category>
		<category><![CDATA[grid layouts]]></category>
		<category><![CDATA[layout change]]></category>
		<category><![CDATA[lt]]></category>
		<category><![CDATA[old hat]]></category>
		<category><![CDATA[relative measurements]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-elastic-grid-layouts-in-css/</guid>
		<description><![CDATA[Flexible layouts are created by using relative measurements as opposed to absolute measurements. The question is relative to what? With elastic layouts the measurements are set relative to something internal to the design, usually the size of the type. We previously talked about fluid layouts, which I defined as using measurements relative to the browser [...]]]></description>
			<content:encoded><![CDATA[<p>Flexible layouts are created by using relative measurements as opposed to absolute measurements. The question is relative to what? With elastic layouts the measurements are set relative to something internal to the design, usually the <a href="http://www.vanseodesign.com/web-design/legible-readable-typography/">size of the type</a>.<br />
<span></span><br />
<a href="http://www.flickr.com/photos/unlistedsightings/2287026370/"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/elastic-mind.jpg" alt="Design and the elastic mind" width="465" height="313" /></a></p>
<p>We previously talked about <a href="http://www.vanseodesign.com/css/fluid-layout-code/">fluid layouts</a>, which I defined as using measurements relative to the browser window. Moving from a fluid layout to an elastic layout is actually quite simple. In fact we only need to make one change to the css we previously used to make the layout change.</p>
<p>Before getting to the code let me say the definitions above aren&#8217;t necessarily used by all. When people talk about fluid layouts they sometimes mean any flexible layout. I&#8217;m defining things as:</p>
<ul>
<li><strong>Flexible layout </strong> &mdash; any layout that uses relative measurements to allow the layout to resize under different conditions</li>
<li><strong>Fluid layouts </strong> &mdash; layouts with measurements relative to the browser window</li>
<li><strong>Elastic layouts  </strong> &mdash; layouts with measurements relative to something internal to the design such as the size of the type</li>
</ul>
<p>Both fluid and <a href="http://www.456bereastreet.com/archive/200504/fixed_or_fluid_width_elastic/">elastic layouts</a> are flexible. Again not everyone would define these layouts this way. All three terms are often used to describe any layout that resizes itself.</p>
<p>As always if you prefer to skip the explanations below and jump right to the code you can view the <a href="http://vanseodesign.com/blog/demo/elastic-layout/elastic-2.php">demo layouts here</a>.</p>
<p><a href="http://vanseodesign.com/blog/demo/elastic-layout/elastic-2.php"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/elastic-2-column.png" alt="2 column elastic layout" width="465" height="295" /></a></p>
<h2>The HTML</h2>
<p>If you&#8217;ve been following along with this series of posts on <a href="http://www.vanseodesign.com/css/2-column-layout-code/">creating css layouts</a> this html should be old hat by now.</p>
<pre>
<span>&lt;div id=<span>&quot;container&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;header&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Header<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Main content<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;sidebar&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Sidebar<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Footer<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>The only difference between what&#8217;s here and what we previously saw with the fluid layouts is the addition of the container div.</p>
<p>You can alternately use the body tag as the container. I&#8217;m using a dedicated container div as it&#8217;s been my practice and I&#8217;m unaware of any real advantages in using one method over the other.</p>
<p><a href="http://vanseodesign.com/blog/demo/elastic-layout/elastic-3.php"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/elastic-3-column.png" alt="3 column elastic layout" width="465" height="285" /></a></p>
<h2>The CSS</h2>
<p>Most of this css should also be familiar by now. In fact part of the reason for this series of posts has been to let you see how similar and simple the code is for these <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-1/">different types of layouts</a>.</p>
<p>In many ways this is the beauty of css. A few small changes in the code can have a significant impact on how the html structure is presented.</p>
<pre>
<span>body {</span>font-size: 1em<span>}</span>
<span>#container {</span><span>max-width</span><span>:</span><span> 75em</span><span>;</span> <span>margin</span><span>:</span><span> 0 auto</span><span>;</span><span>}</span>
<span>#content {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>67%</span><span>;</span>
<span>}</span>
<span>#sidebar {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>33%</span><span>;</span>
<span>}</span>
<span>#footer {</span>
	<span>clear</span><span>:</span><span>both</span><span>;</span>
<span>}</span>
</pre>
<p>The only real difference here as compared to our fluid layouts is that we set the width of #container. Remember in the fluid layouts we used the  body as the container.</p>
<p>In the fluid layouts we allowed the width of the body to be 100% of the browser width. Here I&#8217;ve set the max-width of #container to be 75em.</p>
<p>We&#8217;ve given the body a font-size of 1em, which will <a href="http://www.vanseodesign.com/css/thoughts-on-building-a-typographic-stylesheet/">default to 16px in most browsers</a>, so 75em is equal to 16 x 75 or 1200px.</p>
<p>I&#8217;m using max-width as opposed to width since it&#8217;s more flexible. This allows the layout to resize when the browser is open less than 1200px wide. Had we used width instead we&#8217;d see a horizontal scroll bar when the browser is open less then 1200px.</p>
<p>Everything else is the same as when we developed a fluid layout however that one small change to the width of the container changes what we&#8217;re measuring against.</p>
<p>If we continue deeper into the <a href="http://green-beast.com/blog/?p=199">layout</a> the width of the content is 67%. That 67% is measured against it&#8217;s parent, which is #container. #container is relative to the font-size and so #content is relative to the font-size too. Similar for #sidebar.</p>
<p><a href="http://kellymainphotography.deviantart.com/art/Elastic-Band-210828414"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/elastic-band.jpg" alt="Elastic band" width="465" height="349" /></a></p>
<h2>Elastic Grids</h2>
<p>A couple of years ago Ethan Marcotte wrote an article for A List Apart on <a href="http://www.alistapart.com/articles/fluidgrids/">Fluid Grids</a>. What Ethan referred to as fluid I&#8217;m calling elastic. I think Ethan now uses the more generic flexible grids.</p>
<p>Without getting into developing <a href="http://www.vanseodesign.com/web-design/grid-anatomy/">grids</a> here, the basic idea for making grids elastic is to switch from using absolute measurements to using relative measurements like we&#8217;ve done above.</p>
<p>When setting up <a href="http://www.vanseodesign.com/web-design/grid-types/">different grids</a> it&#8217;s usually easier to think in terms of absolute measurements. Ethan offered a simple formula for then converting those measurements into relative ones to create the <a href="http://www.markboulton.co.uk/journal/comments/five-simple-steps-to-designing-grid-systems-part-5">flexible grid</a>.</p>
<p>target &divide; context = result</p>
<p>This is what we did above when we set the max-width on the container. Our result was 75em. Out target was 1200px. Our context was the 1em (or 16px) we set for the font-size of the body.</p>
<p>1200 (target) &divide; 16 (context) = 75 (result)</p>
<p>When we set widths on the content and sidebar divs our results are 67% and 33% respectively. While I didn&#8217;t show it here the targets were maximum widths of 800px and 400px.</p>
<p>800 &divide; 1200 &times; 100% = 67%</p>
<p>400 &divide; 1200 &times; 100% = 33%</p>
<p>The <a href="http://www.vanseodesign.com/web-design/framing-expectation-exposure-effect/">context</a> for both was the width of the container div. When we set widths in % they&#8217;re relative to the width of the parent element.</p>
<p>Sounds relatively simple (no pun intended), but there&#8217;s a potential gotcha waiting.</p>
<p>If we specify any width in &#8216;em&#8217; then the context is the font-size of that element. Above we specified #container in &#8216;em&#8217; but since the font-size of the container is the same as the font-size of the body (its parent) there wasn&#8217;t a problem.</p>
<p>Had we changed the font-size of container to be 1.25 em (20px) then 75em would translate to a new measurement.</p>
<p>20 &times; 75 = 1500 = 16 &times; 75 &times; 1.25</p>
<p>You can play with the code and test this by changing the font-size on different divs to see what happens.</p>
<p>In the cases of #content and #sidebar where we set the width in % changing the font-size on either div won&#8217;t change anything (other than the font-size).</p>
<p>The context will still be the width of the parent as we&#8217;re using % for the measurement. For this reason I think it makes more sense to define your widths using %. Save &#8216;em&#8217; for font-sizes, line-heights, <a href="http://jontangerine.com/log/2007/09/the-incredible-em-and-elastic-layouts-with-css">and anything else vertical</a>.</p>
<p>Again you can test this and see what happens.</p>
<p>As long as you remain aware of any changes in your context this shouldn&#8217;t cause any problems. However if you find your <a href="http://www.vanseodesign.com/web-design/3-design-layouts/">layout</a> not looking right, this context change is probably a good place to start investigating why.</p>
<p><a href="http://gr8-gatensby.deviantart.com/art/Elastic-Ball-131684532"><img src="http://www.vanseodesign.com/blog/wp-content/uploads/2011/06/rubber-band-ball-2.jpg" alt="Ball of yellow and blue rubber bands" width="465" height="349" /></a></p>
<h2>Summary</h2>
<p>Developing flexible layouts with relative measurements should be a goal for web design as the format in which our designs live (the browser) will always be flexible. </p>
<p>Those measurements can be relative to the browser, which I&#8217;ve defined as fluid layouts or relative to something internal to the design, which I&#8217;ve defined as elastic layouts.</p>
<p>The names aren&#8217;t specifically important, but the concept is. It makes more sense to use measurements relative to something internal in the design.</p>
<p>It&#8217;s quite simple to move from a fluid layout to an elastic one. All it takes is changing the measurement of the outermost container from % to &#8216;em.&#8217; Everything inside that container will then be relative to the design instead of the browser window. Inner containers can continue to be measured in %.</p>
<p>Taking it further and creating elastic grids we&#8217;ll use these same measurements. With some not too difficult math we can create grids that resize themselves as the text resizes.</p>
<p>If we also use max-widths in places instead of widths we have a layout that can resize itself as the browser resizes.</p>
<p>We&#8217;re almost done with this series of posts on <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-2/">css layouts</a>. Next week we&#8217;ll consider flexible images and the following week we&#8217;ll look at media queries while we build toward a discussion of responsive layouts.</p>
<p><img src="http://www.vanseodesign.com/blog/?ak_action=api_record_view&amp;id=3003&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/n9tlpX1ah0ZgRARbtmDuuO68yF4/0/da"><img src="http://feedads.g.doubleclick.net/~a/n9tlpX1ah0ZgRARbtmDuuO68yF4/0/di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/n9tlpX1ah0ZgRARbtmDuuO68yF4/1/da"><img src="http://feedads.g.doubleclick.net/~a/n9tlpX1ah0ZgRARbtmDuuO68yF4/1/di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://feeds.feedburner.com/~r/TheVanBlog/~4/yr8NhZ5Lpyk" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-develop-elastic-grid-layouts-in-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 super useful tools for JavaScript developers</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-super-useful-tools-for-javascript-developers/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-super-useful-tools-for-javascript-developers/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 10:50:07 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[browser bar]]></category>
		<category><![CDATA[code test]]></category>
		<category><![CDATA[digital libraries]]></category>
		<category><![CDATA[endless possibilities]]></category>
		<category><![CDATA[javascript developers]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[mcgill ca]]></category>
		<category><![CDATA[media queries]]></category>
		<category><![CDATA[most common tasks]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-super-useful-tools-for-javascript-developers/</guid>
		<description><![CDATA[MicroJS Need a piece of code quickly? MicroJS is a brand new site which aim to provide JavaScript code snippet for most common tasks: Ajax, Json, DOM, Object-Oriented JavaScript, and more. A true gold mine to have in your bookmarks! Visit http://microjs.com/ Diva.js Diva is a Javascript frontend for viewing documents, designed to work with [...]]]></description>
			<content:encoded><![CDATA[<h2>MicroJS</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2011/06/microjs.png" alt="" /><br /> Need a piece of code quickly? MicroJS is a brand new site which aim to provide JavaScript code snippet for most common tasks: Ajax, Json, DOM, Object-Oriented JavaScript, and more. A true gold mine to have in your bookmarks!<br /> <strong>Visit <a href="http://microjs.com">http://microjs.com/</a></strong></p>
<h2>Diva.js</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2011/06/divajs.png" alt="" /><br /> Diva is a Javascript frontend for viewing documents, designed to work with digital libraries to present multi-page documents as a single, continuous item. It is designed to work with a <a href="http://iipimage.sourceforge.net/">IIPImage server</a> and will be an awesome tool for those working on library or bookstore websites. A demo is available <a href="http://ddmal.music.mcgill.ca/diva/demo/">here</a> if you want to have a look.<br /> <strong>Visit <a href="http://ddmal.music.mcgill.ca/diva/">http://ddmal.music.mcgill.ca/diva/</a></strong></p>
<h2>Bookmarklet Generator</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2011/06/bookmarklet.png" alt="" /><br /> As you can guess, this tool is a bookmarklet generator: Simply paste your regular JavaScript code, press the button and you&#8217;ll get a bookmarklet &#8211; ready to be installed on your browser bar.<br /> <strong>Visit <a href="http://benalman.com/code/test/jquery-run-code-bookmarklet">http://benalman.com/code/test/jquery-run-code-bookmarklet/</a></strong></p>
<h2>jQAPI</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2011/06/jqapi.png" alt="" /><br /> Like any other jQuery developers, I spend a large amount of time digging in the documentation. jQAPI is a website which provides the jQuery documentation in a more user-friendly way, so it is now my reference site when I need any jQuery help.<br /> <strong>Visit <a href="http://jqapi.com/">http://jqapi.com</a></strong></p>
<h2>heatmap.js</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2011/06/heatmap.png" alt="" /><br /> Day after day, JavaScript continues to surprise me with its endless possibilities: For example, heatmap.js allows you to generate web heatmaps with the html5canvas element based on your data. Easy and efficient!<br /> <strong>Visit <a href="http://www.patrick-wied.at/static/heatmapjs/">http://www.patrick-wied.at/static/heatmapjs/</a></strong></p>
<h2>Respond.js</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2011/06/respond.png" alt="" /><br /> Remember my article about <a href="http://www.catswhocode.com/blog/create-an-adaptable-website-layout-with-css3-media-queries">adaptable layouts</a> with CSS3 media queries? Respond.js is a small script that allow you to use CSS3 media queries on browsers that do not support it yet (Yes IE, we&#8217;re looking at you&#8230;).<br /> <strong>Visit <a href="https://github.com/scottjehl/Respond/blob/master/respond.min.js">https://github.com/scottjehl/Respond/blob/master/respond.min.js</a></strong></p>
<h2>Modernizr</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2011/06/modernizr.png" alt="" /><br /> Modernizr is a script that helps older browsers to work almost as good as newest ones, so you can build modern applications that will work on IE6 and 7. Your clients will love it, that&#8217;s guaranteed.<br /> <strong>Visit <a href="http://www.modernizr.com/">http://www.modernizr.com/</a></strong></p>
<h2>YepNope</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2011/06/yepnope.png" alt="" /><br /> YepNope aim is pretty simple: It answers <em>yep</em>, or <em>nope</em>. For example, ask YepNope is Modernizr is loaded. If yes, ask YepNope to do this, and if not, ask YepNope to do that. That&#8217;s simple as that, and very useful in many cases.<br /> <strong>Visit <a href="http://yepnopejs.com/">http://yepnopejs.com/</a></strong></p>
<h2>Ligature.js</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2011/06/ligature.png" alt="" /><br /> Ligature.js is, unsurprisingly, a script that adds pretty ligatures to any kind of text. A must-have for all typography lovers out here!<br /> <strong>Visit <a href="http://code.google.com/p/ligature-js/">http://code.google.com/p/ligature-js/</a></strong></p>
<h2>FitText.js</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2011/06/fittext.png" alt="" /><br /> FitText is a very interesting tool, that allows the automatic resizing of a text regarding the size of its parent element. Just have a look to the website and resize your browser: The text will fit. Another very interesting tool for modern websites and applications!<br /> <strong>Visit <a href="http://fittextjs.com/">http://fittextjs.com/</a></strong></p>
<p> <img src="http://feeds.feedburner.com/~r/Catswhocode/~4/HBe1V-3-j20" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/Catswhocode">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-super-useful-tools-for-javascript-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance is a Feature</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/performance-is-a-feature/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/performance-is-a-feature/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 10:46:51 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[funny]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[bermuda vacation]]></category>
		<category><![CDATA[golden reference]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[opportunity cost]]></category>
		<category><![CDATA[public internet]]></category>
		<category><![CDATA[stack overflow]]></category>
		<category><![CDATA[trophy wife]]></category>
		<category><![CDATA[website loads]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/performance-is-a-feature/</guid>
		<description><![CDATA[We&#8217;ve always put a heavy emphasis on performance at Stack Overflow and Stack Exchange. Not just because we&#8217;re performance wonks (guilty!), but because we think speed is a competitive advantage. There&#8217;s plenty of experimental data proving that the slower your website loads and displays, the less people will use it. [Google found that] the page [...]]]></description>
			<content:encoded><![CDATA[<p>
We&#8217;ve always put a heavy emphasis on performance at Stack Overflow and <a href="http://stackexchange.com">Stack Exchange</a>. Not just because we&#8217;re performance wonks (guilty!), but because we think speed is a competitive advantage. There&#8217;s <a href="http://www.codinghorror.com/blog/2006/11/speed-still-matters.html">plenty of experimental data</a> proving that <b>the slower your website loads and displays, the less people will use it.</b></p>
<blockquote><p>
[Google found that] the page with 10 results took 0.4 seconds to generate. The page with 30 results took 0.9 seconds. Half a second delay caused a 20% drop in traffic. Half a second delay killed user satisfaction.</p>
<p>In A/B tests, [Amazon] tried delaying the page in increments of 100 milliseconds and found that even very small delays would result in substantial and costly drops in revenue.
</p></blockquote>
<p>
I believe the converse of this is also true. That is, the faster your website is, the <i>more</i> people will use it. This follows logically if you think like <a href="http://www.codinghorror.com/blog/2007/06/designing-for-informavores-or-why-users-behave-like-animals-online.html">an information omnivore</a>: the faster you can load the page, the faster you can tell whether that page contains what you want. Therefore, you should always favor fast websites. The opportunity cost for switching on the public internet is effectively nil, and whatever it is that you&#8217;re looking for, there are multiple websites that offer a similar experience. So how do you distinguish yourself? <b>You start by being, above all else, <i>fast</i>.</b></p>
<p>
Do you, too, <a href="http://www.youtube.com/watch?v=OlkInNZ7xis">feel the need &ndash; the need for speed?</a> If so, I have three pieces of advice that I&#8217;d like to share with you.</p>
<p><h3>1. Follow the Yahoo Guidelines. Religiously.</h3>
<p>
The golden reference standard for building a fast website remains <a href="http://www.codinghorror.com/blog/2007/08/yslow-yahoos-problems-are-not-your-problems.html">Yahoo&#8217;s 13 Simple Rules for Speeding Up Your Web Site</a> from 2007. There is one caveat, however:</p>
<blockquote><p>
There&#8217;s some good advice here, but there&#8217;s also a lot of advice that only makes sense if you run a website that gets millions of unique users per day. Do you run a website like that? If so, what are you doing reading this instead of flying your private jet to a Bermuda vacation with your trophy wife?
</p></blockquote>
<p>
So &hellip; a funny thing happened to me since I wrote that four years ago. I now run <a href="http://stackexchange.com/sites">a network of public, community driven Q&amp;A web sites</a> that <i>do</i> get millions of daily unique users. (I&#8217;m still waiting on the jet and trophy wife.) It does depend a little on the size of your site, but if you run a public website, <b>you really should <a href="http://developer.yahoo.com/performance/rules.html">pore over Yahoo&#8217;s checklist</a> and take every line of it to heart</b>. Or use the tools that do this for you:</p>
<ul>
<li><a href="http://developer.yahoo.com/yslow/">Yahoo YSlow</a>
<li><a href="http://code.google.com/speed/page-speed/">Google Page Speed</a>
<li><a href="http://tools.pingdom.com/">Pingdom Tools</a>
</ul>
<p>
We&#8217;ve long since implemented most of the 13 items on Yahoo&#8217;s list, except for one. But it&#8217;s a big one: <a href="http://developer.yahoo.com/performance/rules.html#cdn">Using a Content Delivery Network</a>.</p>
<blockquote><p>
The user&#8217;s proximity to your web server has an impact on response times. Deploying your content across multiple, geographically dispersed servers will make your pages load faster from the user&#8217;s perspective. But where should you start?</p>
<p>
As a first step to implementing geographically dispersed content, don&#8217;t attempt to redesign your web application to work in a distributed architecture. Depending on the application, changing the architecture could include daunting tasks such as synchronizing session state and replicating database transactions across server locations. Attempts to reduce the distance between users and your content could be delayed by, or never pass, this application architecture step.</p>
<p>
Remember that 80-90% of the end-user response time is spent downloading all the components in the page: images, stylesheets, scripts, Flash, etc. This is the <i>Performance Golden Rule</i>. Rather than starting with the difficult task of redesigning your application architecture, it&#8217;s better to first disperse your static content. This not only achieves a bigger reduction in response times, but it&#8217;s easier thanks to content delivery networks.
</p></blockquote>
<p>
As a final optimization step, we just <a href="http://blog.stackoverflow.com/2011/05/the-speed-of-light-sucks/">rolled out a CDN for all our static content</a>. The results are promising; the baseline here is our datacenter in NYC, so the below should be read as <i>&#8220;how much faster did our website get for users in this area of the world?&#8221;</i></p>
<p>
<img alt="Cdn-performance-test-world-map" src="http://www.codinghorror.com/.a/6a0120a85dcdae970b01543324aae7970c-800wi" border="0" /></p>
<p>
In the interests of technical accuracy, static content isn&#8217;t the complete performance picture; you still have to talk to our servers in NYC to get the dynamic content which is the meat of the page. But 90% of our visitors are anonymous, only 36% of our traffic is from the USA, and Yahoo&#8217;s research shows that <a href="http://yuiblog.com/blog/2007/01/04/performance-research-part-2/">40 to 60 percent of daily vistors come in with an empty browser cache</a>. Optimizing this cold cache performance worldwide is a <i>huge</i> win.</p>
<p>
Now, I would not recommend going <i>directly</i> for a CDN. I&#8217;d leave that until later, as there are a bunch of performance tweaks on Yahoo&#8217;s list which are free and trivial to implement. But using a CDN has gotten a heck of a lot less expensive and much simpler since 2007, with lots more competition in the space from companies like <a href="http://aws.amazon.com/cloudfront/">Amazon&#8217;s</a>, <a href="http://www.netdna.com/">NetDNA</a>, and <a href="http://www.cachefly.com/">CacheFly</a>. So when the time comes, and you&#8217;ve worked through the Yahoo list as religiously as I recommend, you&#8217;ll be ready.</p>
<p><h3>2. Love (and Optimize for) Your Anonymous <i>and</i> Registered Users</h3>
<p>
Our Q&amp;A sites are all about making the internet better. That&#8217;s why all the contributed content is <a href="http://blog.stackoverflow.com/category/cc-wiki-dump/">licensed back to the community under Creative Commons</a> and <i>always</i> visible regardless of whether you are logged in or not. I <a href="http://www.codinghorror.com/blog/2007/06/avoiding-walled-gardens-on-the-internet.html">despise walled gardens</a>. In fact, you don&#8217;t actually have to log in <i>at all</i> to participate in Q&amp;A with us. Not even a little!</p>
<p>
The primary source of our traffic is <a href="http://www.codinghorror.com/blog/2011/01/trouble-in-the-house-of-google.html">anonymous users arriving from search engines</a> and elsewhere. It&#8217;s classic &#8220;write once, read &ndash; and <a href="http://blog.stackoverflow.com/2011/02/suggested-edits-and-edit-review/">hopefully edit</a> &ndash; millions of times.&#8221; But we are also making the site richer and more dynamic for our avid community members, who definitely <i>are</i> logged in. We add features all the time, which means we&#8217;re serving up more JavaScript and HTML. There&#8217;s an unavoidable tension here between the download footprint for users who are on the site every day, and users who may visit once a month or once a year. </p>
<p>
Both classes are important, but have fundamentally different needs. Anonymous users are voracious consumers optimizing for rapid browsing, while our avid community members are the source of all the great content that drives the network. These guys (and gals) need each other, and they both deserve special treatment. <b>We design and optimize for two classes of users: anonymous, and logged in.</b> Consider the following Google Chrome network panel trace on a random Super User question I picked:</p>
<table cellpadding="2" cellspacing="2" width="640px">
<tr>
<td>&nbsp;</td>
<td>requests</td>
<td>data transferred</td>
<td>DOMContentLoaded</td>
<td>onload</td>
</tr>
<tr>
<td>Logged in (as me)</td>
<td>29</td>
<td>233.31 KB</td>
<td>1.17 s</td>
<td>1.31 s</td>
</tr>
<tr>
<td>Anonymous</td>
<td>22</td>
<td>111.40 KB</td>
<td>768 ms</td>
<td>1.28 s</td>
</tr>
</table>
<p>
We minimize the footprint of HTML, CSS and Javascript for anonymous users so they get their pages <i>even faster</i>. We load a stub of very basic functionality and dynamically &#8220;rez in&#8221; things like editing when the user focuses the answer input area. For logged in users, the footprint is necessarily larger, but we can also add features for our most avid community members at will without fear of harming the experience of the vast, silent majority of anonymous users.</p>
<p><h3>3. Make Performance a Point of (Public) Pride</h3>
<p>
Now that we&#8217;ve exhausted the Yahoo performance guidance, and made sure we&#8217;re serving the absolute minimum necessary to our anonymous users &ndash; where else can we go for performance? Back to our code, of course. </p>
<p>
When it comes to website performance, there is no getting around one fundamental law of the universe: <b>you can never serve a webpage faster than it you can render it on the server.</b> I know, duh. But I&#8217;m telling you, it&#8217;s very easy to fall into the trap of not noticing a few hundred milliseconds here and there over the course of a year or so of development, and then one day you turn around and your pages are taking almost a full freaking second to render on the server. It&#8217;s a heck of a liability to start <i>1 full second in the hole</i> before you&#8217;ve even transmitted your first byte over the wire!</p>
<p>
That&#8217;s why, as a developer, you need to put performance right in front of your face on every single page, all the time. That&#8217;s exactly what we did with our <a href="http://code.google.com/p/mvc-mini-profiler/">MVC Mini Profiler</a>, which we are contributing back to the world as open source. The simple act of <b>putting a render time in the upper right hand corner of every page we serve</b> forced us to fix all our performance regressions and omissions.</p>
<p>
<a href="http://code.google.com/p/mvc-mini-profiler/"><img alt="Mvc-mini-profiler-question-page" src="http://www.codinghorror.com/.a/6a0120a85dcdae970b014e89452246970d-800wi" border="0" /></a></p>
<p>
(Note that you can click on the SQL linked above to see what&#8217;s actually being run and how long it took in each step. <i>And</i> you can use the share link to share the profiler data for this run with your fellow developers to <s>shame them</s> diagnose a particular problem. <i>And</i> it works for multiple AJAX requests. Have I mentioned that our open source MVC Mini Profiler is totally freaking awesome? If you&#8217;re on a .NET stack, you should really <a href="http://code.google.com/p/mvc-mini-profiler/">check it out</a>. )</p>
<p>
In fact, with the render time appearing on every page for everyone on the dev team, <b>performance became a point of pride</b>. We had so many places where we had just gotten a <i>little</i> sloppy or missed some <i>tiny</i> thing that slowed a page down inordinately. Most of the performance fixes were trivial, and even the ones that were not turned into fantastic opportunities to rearchitect and make things simpler and faster for all of our users.</p>
<p>
Did it work? You bet your sweet <a href="http://msdn.microsoft.com/en-us/library/496e4ekx.aspx">ILAsm</a> it worked:</p>
<p>
<img alt="Google-webmaster-crawl-stats-download-time" src="http://www.codinghorror.com/.a/6a0120a85dcdae970b0154332506cc970c-800wi" border="0" /></p>
<p>
That&#8217;s the Google crawler page download time; the experimental Google <a href="http://www.google.com/support/webmasters/bin/answer.py?answer=158541">Site Performance page</a>, which ostensibly reflects complete full-page browser load time, confirms the improvements:</p>
<p>
<img alt="Google-webmaster-site-performance-overview" src="http://www.codinghorror.com/.a/6a0120a85dcdae970b015433250717970c-800wi" border="0" /></p>
<p>
While server page render time is only part of the performance story, it is the baseline from which you start. I cannot emphasize enough how much the simple act of putting the page render time on the page helped us, as a development team, build a dramatically faster site. Our site was always relatively fast, but even for a historically &#8220;fast&#8221; site like ours, we realized huge gains in performance from this one simple change.</p>
<p>
I won&#8217;t lie to you. Performance isn&#8217;t easy. It&#8217;s been a long, hard road getting to where we are now &ndash; and we&#8217;ve thrown a lot of unicorn dollars toward <a href="http://blog.serverfault.com/post/1432571770/">really nice hardware</a> to run everything on, though I wouldn&#8217;t call any of our hardware choices particularly extravagant. And I did <a href="http://www.codinghorror.com/blog/2008/12/hardware-is-cheap-programmers-are-expensive.html">follow my own advice</a>, for the record.</p>
<p>
I distinctly remember switching from AltaVista to Google back in 2000 in no small part because it was blazing fast. To me, <b>performance is a feature</b>, and I simply like using fast websites more than slow websites, so naturally I&#8217;m going to build a site that I would want to use. But I think there&#8217;s also a lesson to be learned here about the competitive landscape of the public internet, where there are two kinds of websites: <b>the quick and the dead</b>.</p>
<p>
Which one will you be?</p>
<p>
<a href="http://feeds.feedburner.com/codinghorror">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/performance-is-a-feature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Steal Like A Designer And Produce Better Work</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-steal-like-a-designer-and-produce-better-work/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-steal-like-a-designer-and-produce-better-work/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 02:57:05 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[creative process]]></category>
		<category><![CDATA[future source]]></category>
		<category><![CDATA[great artists]]></category>
		<category><![CDATA[intersections]]></category>
		<category><![CDATA[mdash]]></category>
		<category><![CDATA[Pablo Picasso]]></category>
		<category><![CDATA[source material]]></category>
		<category><![CDATA[vincent van gogh]]></category>
		<category><![CDATA[wor]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-steal-like-a-designer-and-produce-better-work/</guid>
		<description><![CDATA[Good artists borrow great artists steal &#8212; Pablo Picasso I&#8217;m sure you&#8217;ve seen the above quote before. What does it really mean? Is it an ok from one of the world&#8217;s great artists to literally steal from others? Is it an excuse to ignore copyright? No and no. It&#8217;s a much deeper statement about the [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>
Good artists borrow great artists steal<br />
&mdash; <em>Pablo Picasso</em>
</p>
</blockquote>
<p>I&#8217;m sure you&#8217;ve seen the above quote before. What does it really mean? Is it an ok from one of the world&#8217;s great artists to literally steal from others? Is it an excuse to ignore copyright? No and no. It&#8217;s a much deeper statement about the creative process.<br />
<span></span><br />
<a href="http://www.flickr.com/photos/hisgett/2558159615/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/addec_picasso.jpg" alt="Pablo Picasso - Mandolin and a Glass of Pernod (1911)" width="465" height="335" /></a></p>
<h2>Steal Like an Artist</h2>
<p>What does it mean to <a href="http://www.austinkleon.com/2011/03/30/how-to-steal-like-an-artist-and-9-other-things-nobody-told-me/">steal like an artist</a>? What was Picasso trying to say?</p>
<p>When you borrow something you plan on giving it back. At least you&#8217;re supposed to. When you steal something you make it your own. It&#8217;s the making it your own that Picasso was suggesting.</p>
<p>Great artists stealing doesn&#8217;t mean they copy the work of others and pass it off as their own. It means they so absorb the work and ideas of others that they can recombine everything with their own work and thoughts to create something truly theirs.</p>
<p>It&#8217;s a similar idea to the <a href="http://www.themedicieffect.com/book/">Medici effect</a>, the idea of <a href="http://www.copyblogger.com/content-success/">finding intersections at the crossroads</a> of ideas in different disciplines and combining what you find into something new or unique to your discipline.</p>
<p>To make ideas your own you need to take them apart to understand how they were put together and why they were put together in a certain way. You have to assimilate and internalize those ideas so they mix with your own.</p>
<p>A few years ago I published a post about <a href="http://www.vanseodesign.com/blogging/blogging-voice/">developing your voice as a blogger</a> and suggested that your voice is what comes out after everything you take in is filtered through your thoughts and experiences.</p>
<p>Your voice as a writer, an artist, or a designer is the end product of this artistic theft Picasso talks about.</p>
<p>Your voice comes from filtering things through the sum of all your thoughts and experience. When you steal from other artists you do two things.</p>
<ul>
<li>Provide new source material to run through your filter</li>
<li>Modify your filter for future source material</li>
</ul>
<p>Vincent Van Gogh often referred to himself as a link in a chain. He saw his work as building on the work of those who came before him and leaving something behind for those who came after to build on top of.</p>
<p>In essence he stole from past masters, internalized what he took, reformed it as something of his own, and left it for others to then steal and continue the process.</p>
<p><a href="http://www.flickr.com/photos/fotologic/256600985/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/b0950_stolen.jpg" alt="Stolen poster" width="465" height="286" /></a></p>
<h2>How You Can Steal And Grow as a Designer</h2>
<p>Assuming you&#8217;re on board with the idea of stealing as Picasso meant it here are a few ideas for how you can learn to steal better in order to <a href="http://www.vanseodesign.com/web-design/teach-yourself-design/">grow as a designer</a>.</p>
<ul>
<li><a href="http://www.vanseodesign.com/web-design/inspiration-ideas/">Collect ideas, inspiration, and techniques</a></li>
<li>Set a path for your growth and see and collect everything along that path</li>
<li>Seek quality over quantity</li>
<li>Read, read, and read some more</li>
<li>Look deeper at things. Take the time to <a href="http://www.vanseodesign.com/web-design/why-understand-design-principles/">understand how and why things work</a></li>
<li>Live in the crossroads. Increase the probability of the Medici effect</li>
</ul>
<h3>Collect</h3>
<p>Again the stealing part is about taking things in so your first step to steal and grow as a designer is to collect.</p>
<p>As <a href="http://www.austinkleon.com/2011/03/30/how-to-steal-like-an-artist-and-9-other-things-nobody-told-me/">Austin Kleon points out</a> it&#8217;s not about collecting indiscriminately, but rather selectively. Much of what&#8217;s below is how to collect selectively.</p>
<p><a href="http://www.flickr.com/photos/aidanmorgan/3092101136/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/8fcde_path.jpg" alt="Dirt path in the woods" width="465" height="310" /></a></p>
<h3>Set a Path</h3>
<p>Have you ever noticed once you become interested in some topic that you start noticing information about that topic wherever you go. I know when I start studying something like <a href="http://www.vanseodesign.com/web-design/legible-readable-typography/">typography</a> it seems like every magazine or blog post is about typefaces and line-height, and measure.</p>
<p>It&#8217;s not some mystical thing at work. It&#8217;s simply that you&#8217;re more attentive to the things you&#8217;re interested in.</p>
<p>It&#8217;s important to set the path for your collections. What finds its way into your consciousness is what you develop an interest in. Put a little thought into how you want to grow as a designer. Set a direction for yourself. You&#8217;ll discover yourself finding more things on that path to collect.</p>
<h3>Seek Quality</h3>
<p>You&#8217;re only going to be as good as the ideas and techniques you collect. Garbage in, garbage out. If you want to produce the best work you need to take in the best ideas.</p>
<p>What we collect and take in becomes the source material for what we create. The better the source material, the better the resulting end product.</p>
<p><a href="http://www.flickr.com/photos/brightmeadow/281659324/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/05f42_pen-glasses-notebook.jpg" alt="Fountain pen and glasses resting on notebook" width="465" height="349" /></a></p>
<h3>Read, Read, Read</h3>
<p>One of the best ways to collect ideas is to read the ideas of others. Again read selectively. Read those things you&#8217;re interested in and seek quality over quantity. Read the theory behind design to understand why different <a href="http://www.vanseodesign.com/web-design/7-design-components/">design principles</a> work.</p>
<h3>Look Deeper</h3>
<p>When I first started learning to build websites I would stop whenever I found a site I liked and start pouring over the code. I&#8217;d look at how the html was structured and how the css presented that html. I&#8217;d ask myself why the designer had chosen to do things that way and think if there was a better way to accomplish the same thing.</p>
<p>When I didn&#8217;t have time to study the code at that moment, I&#8217;d bookmark the site and come back later to study it.</p>
<p>That&#8217;s still one of the best way to learn how to develop websites. Think of your favorite sites as your <a href="http://www.vanseodesign.com/blogging/do-you-have-a-blogging-mentor/">mentors</a>. They&#8217;re all willing to tell you exactly how to develop a site of your own. Study their designs. Ask yourself why one <a href="http://www.vanseodesign.com/web-design/design-elements/">design element</a> is red or why another is off to the corner.</p>
<p>When you come across sites giving away snippets of code don&#8217;t just copy the snippet and paste it into your site. When you copy code like that you borrow it. You don&#8217;t make that code your own. You won&#8217;t understand how to apply that code to a different problem or how to fix it when it doesn&#8217;t work. You won&#8217;t own the code. It will own you.</p>
<p>Read the <a href="http://www.vanseodesign.com/css/2-column-layout-code/">tutorial explaining how the code works</a> or better yet study it on your own. You can certainly use the code without doing either, but again you won&#8217;t own it that way. You&#8217;ll be borrowing it.</p>
<p>Always look deeper than what&#8217;s on the surface in everything. You borrow the surface. When you dig deeper you steal what you unearth.</p>
<h3>Live in the Crossroads</h3>
<p>Don&#8217;t limit yourself to collecting from the world of design. Look beyond design for inspiration and ideas. Collect things from other disciplines and think how they might be applied to a design problem.</p>
<p>Be receptive to <a href="http://www.themedicieffect.com/downloads/MediciEffect.pdf">The Medici Effect (PDF)</a></p>
<p>Learn how other industries solve problems. Ask yourself if those solutions will work for some design problems you come across. Be open to taking in ideas that seem unrelated on the surface. Those ideas will modify your filter in unique and interesting ways.</p>
<p><a href="http://www.vanseodesign.com/blogging/writing-and-design/">Write more to be a better designer</a> and design more to be a better writer.  Learn a wider variety of things to see the commonalities between them.</p>
<p><a href="http://www.flickr.com/photos/carlwwycoff/4612327929/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/323c6_homeland-security.jpg" alt="Homeland security police car" width="465" height="309" /></a></p>
<h2>Summary</h2>
<p>Good artists borrow. They copy the techniques of others, but they never make those techniques their own. They never learn to apply them in ways beyond how they were originally presented.</p>
<p>Great artists steal. They internalize the ideas and techniques of others, mix them with everything else they have inside, and release them in new and interesting ways. By stealing they make those ideas and techniques their own.</p>
<p>Stealing in the sense Picasso meant isn&#8217;t about ripping off your fellow designers. It&#8217;s about learning what you can from them and filtering their ideas through yourself in order to build something new.</p>
<p>Be a link in the chain of design. Build on the ideas of others and leave behind something of yourself for other designers to build on.</p>
<p>In this way we all become better and we all push design further.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/03cca_?ak_action=api_record_view&amp;id=2993&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/KX7V1mlezo81mS1zJWz-I88g5YI/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/38206_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/KX7V1mlezo81mS1zJWz-I88g5YI/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/38206_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/ab576_V3G0FIYpuyw" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-steal-like-a-designer-and-produce-better-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>4 Methods For Creating Equal Height Columns In CSS</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-methods-for-creating-equal-height-columns-in-css/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-methods-for-creating-equal-height-columns-in-css/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 02:55:20 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[background image]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[div id]]></category>
		<category><![CDATA[header and footer]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[long time]]></category>
		<category><![CDATA[lt]]></category>
		<category><![CDATA[pros and cons]]></category>
		<category><![CDATA[px]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-methods-for-creating-equal-height-columns-in-css/</guid>
		<description><![CDATA[One of the few things that isn&#8217;t as simple to do with css as it should be is creating columns of equal heights. A variety of methods do exist, each with its pros and cons and I want to present 4 methods here. Let&#8217;s think for a moment about what we mean by equal height [...]]]></description>
			<content:encoded><![CDATA[<p>One of the few things that isn&#8217;t as <a href="http://www.vanseodesign.com/css/css-divs-vs-tables/">simple to do with css</a> as it should be is creating columns of equal heights. A variety of methods do exist, each with its pros and cons and I want to present 4 methods here.<br />
<span></span><br />
Let&#8217;s think for a moment about what we mean by equal height columns.</p>
<p>We generally don&#8217;t mean that  we want the content inside each column to be of equal height. If that were the case there really isn&#8217;t a problem as the height of the columns will naturally be the same height.</p>
<p>What we really mean by equal height columns is having the columns look as though they&#8217;re of equal height when the content inside isn&#8217;t.</p>
<p>We can achieve that by making the <a href="http://www.vanseodesign.com/css/css-background-property/">css backgrounds</a> behind the column appear to be of equal height. Ultimately we&#8217;re faking equal heights.</p>
<p>For those of you wanting to get directly to the demos and code you can click any of the images above the sections below and be taken to the appropriate <a href="http://www.vanseodesign.com/blog/demo/equal-height-columns/faux-columns.php">demo</a>.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/equal-height-columns/faux-columns.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/0f9b5_faux-columns.png" alt="Equal height columns with faux Columns" width="465" height="260" /></a></p>
<h2>Faux Columns</h2>
<p><a href="http://www.alistapart.com/articles/fauxcolumns/">Faux columns</a> have been around a long time. 2004 to be exact. For that same long time they were and maybe still are the deFacto method for creating columns of equal height.</p>
<p>It&#8217;s a simple trick using a background image that&#8217;s repeated vertically. An example of this repeating image is seen below. I&#8217;ve increase the height so you can see it.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/equal-height-columns/faux-columns.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/07c84_faux-columns-background.png" alt="Faux columns background" width="465" height="20" /></a></p>
<p>The image is usually created as a single px in height and it&#8217;s width will match the width of your <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-1/">layout</a>. Where one column becomes another in the layout, the faux column image will change as well.</p>
<h3>The html</h3>
<p>For this example we&#8217;ll use html that&#8217;s similar to what we&#8217;ve been working with <a href="http://www.vanseodesign.com/css/2-column-layout-code/">the last few weeks</a>, though I&#8217;ll skip the header and footer to focus on the columns.</p>
<pre>
<span>&lt;div id=<span>&quot;container&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;sidebar&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Sidebar<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Main content<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>You could use the body as the container, but I&#8217;m choosing to use a container div so you can see that this technique can work for setting up columns inside a part of your overall layout in addition to the overall layout itself.</p>
<h3>The css</h3>
<pre>
<span>#container {</span>
	<span>width</span><span>:</span><span>960px</span><span>;</span>
	<span>margin</span><span>:</span><span>0 auto</span><span>;</span>
	<span>background</span><span>:</span><span> url(<span>"faux-columns.png"</span>) repeat-y</span><span>;</span>
	overflow: hidden
<span>}</span>
<span>#sidebar {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>340px</span><span>;</span>
<span>}</span>
<span>#content {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>620px</span><span>;</span>
<span>}</span>
</pre>
<p>The css here is pretty simple. <a href="http://www.vanseodesign.com/css/understanding-css-floats/">Floating</a> and setting widths on #sidebar and #content should be familiar to you by now as well as setting the width and margin on #container.</p>
<p>What&#8217;s new here is setting the faux-column background image on the container and using overflow: hidden on the container.</p>
<p>We need to set the overflow property to ensure the container div doesn&#8217;t collapse. Because everything inside is floated we need to force it back open.</p>
<p>The container will then always be the same height as the longer of the 2 columns and the background image will make it appear as though the shorter column is also the same height.</p>
<p>This method works best for <a href="http://www.vanseodesign.com/css/3-column-layout-code/">fixed width layouts</a> though it can work with more fluid layouts as well.</p>
<p>You also aren&#8217;t limited to a simple color change in backgrounds. Borders, shadows, patterns, etc. can be added by adding them in the appropriate place on the faux-column image.</p>
<p>For patterns you might choose to create an image more than 1px in height.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>Easy to set up</li>
<li>Work regardless of which column is the longer or shorter</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Requires an image, which requires an additional http request</li>
<li>Any change to the layout requires the image be reworked</li>
<li>Need to know what your layout will look like in advance to create the image</li>
</ul>
<p><a href="http://www.vanseodesign.com/blog/demo/equal-height-columns/pseudo-columns.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/98669_faux-columns1.png" alt="Pseudo method for creating equal height columns" width="465" height="181" /></a></p>
<h2>Pseudo Columns</h2>
<p>I&#8217;ve never cared for faux columns. Not because it&#8217;s a bad method, but because I have a thing about never using an image for a solid background color.</p>
<p>Because of that I developed my own method for achieving equal height columns, which for lack of a better term I&#8217;ll call pseudo columns.</p>
<p>It works similarly to faux columns as it involves setting a background on the container. It&#8217;s not a general approach to equal height columns and has a very limited use case, but when you encounter that use case it works well and easily.</p>
<h3>The html</h3>
<p>We&#8217;ll use the same html as the faux column method above.</p>
<pre>
<span>&lt;div id=<span>&quot;container&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;sidebar&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Sidebar<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Main content<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>Once again no header and footer so we can focus on the columns.</p>
<h3>The css</h3>
<p>The css is again quite simple. I&#8217;ve gone with a <a href="http://www.vanseodesign.com/css/fluid-layout-code/">fluid layout</a> here for variety, but you could just as easily set this up to be fixed width.</p>
<pre>
<span>#container {</span>
	<span>background</span><span>:</span><span> #555</span><span>;</span>
	overflow: hidden
<span>}</span>
<span>#content {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>75%</span><span>;</span>
	<span>background</span><span>:</span><span>#eee</span><span>;</span>
<span>}</span>
<span>#sidebar {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>25%</span><span>;</span>
	<span>background</span><span>:</span><span>#555</span><span>;</span>
<span>}</span>
</pre>
<p>Other than using % instead of px, you&#8217;ll notice that here I&#8217;ve set the background colors on #content and #sidebar. You&#8217;ll only need to set it on whichever column will be longer, but here I&#8217;ve set it on both.</p>
<p>The main change from faux columns is instead of a background image we set a background <a href="http://www.vanseodesign.com/web-design/color-theory/">color</a>. It&#8217;s the same principle in that we&#8217;re allowing the background of the container to show through beneath the shorter columns.</p>
<p>The limitation is we need to know which column will be shorter in advance and ideally that same column would be shorter on every page of the site.</p>
<p>That sounds like a pretty big limitation, but I find in practice one of the two columns is usually shorter across most, if not all, pages and for those pages where it might not be the case, it&#8217;s easy enough to add a little more or less content to make it so.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>Easy to set up</li>
<li>Easy to maintain</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Harder to implement on more than 2 or 3 columns</li>
<li>Requires you know the relative heights of columns in advance</li>
<li>Doesn&#8217;t work as well when different columns are longer or shorter on different pages</li>
</ul>
<p>This method is far from perfect, but you might be surprised how often it can be applied in practice.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/equal-height-columns/borders-margins.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/3a360_borders-margins.png" alt="Equal height columns with borders and negative margins" width="465" height="281" /></a></p>
<h2>Borders and Negative Margins</h2>
<p>This is a method I came across not too long ago on a <a href="http://www.smashingmagazine.com/2010/11/08/equal-height-columns-using-borders-and-negative-margins-with-css/">Smashing Magazine</a> article by Thierry Koblentz, though I later  found an article by Alan Pearce on <a href="http://www.alistapart.com/articles/multicolumnlayouts/">A List Apart</a> written a few years ago detailing the same method.</p>
<p>It uses borders and negative margins to give the appearance of the equal height columns.</p>
<h3>The html</h3>
<p>Nothing new in the html here compared to what we&#8217;ve seen above. In his article Thierry uses the body as the container, but I&#8217;ll stick to using a container div as is my usual practice.</p>
<pre>
<span>&lt;div id=<span>&quot;container&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;sidebar&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Sidebar<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Main content<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<h3>The css</h3>
<p>The css is where things get interesting. The container is just being used to fix the width and center the layout. The interesting stuff happens on #content and #sidebar.</p>
<pre>
<span>#container {</span>
	<span>width</span><span>:</span><span>960px</span><span>;</span>
	<span>margin</span><span>:</span><span> 0 auto</span><span>;</span>
<span>}</span>
<span>#content {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>700px</span><span>;</span>
	<span>border-left</span><span>:</span><span> 260px solid #555</span><span>;</span>
<span>}</span>
<span>#sidebar {</span>
	<span>float</span><span>:</span><span> left</span><span>;</span>
	<span>width</span><span>:</span><span>260px</span><span>;</span>
	<span>margin-right</span><span>:</span><span> -260px</span><span>;</span>
	<span>position</span><span>:</span><span> relative</span><span>;</span>
<span>}</span>
</pre>
<p>All the background colors in this method are set on the #content column. We set it&#8217;s background as normal and then give it a left <a href="http://www.vanseodesign.com/css/creating-shapes-with-css-borders/">border</a> equal to the width of the sidebar. We also set the border color to what we want the sidebar background to be.</p>
<p>If we stop here you&#8217;ll see both columns displayed where you want, however our border-left has pushed the actual sidebar off the page and we need to bring it back.</p>
<p>First we give the sidebar a negative right margin equal to its width (or the width of the left border of the content, which are the same). That will bring the sidebar back to where we want, but it still isn&#8217;t <a href="http://www.vanseodesign.com/css/visibility-vs-display/">visible</a>.</p>
<p>The problem is in the <a href="http://www.vanseodesign.com/css/css-stack-z-index/">stacking order</a> of the 2 divs. #container is sitting on top of #sidebar so we need to move #sidebar to the front. We do that by adding position: relative to the sidebar and now it&#8217;s content is visible.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>Works regardless of which columns is longer or shorter</li>
<li>Easy to set up once you understand how it works</li>
<li>Easy to maintain</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Sidebar width needs to be fixed as border-width only accepts absolute measurements</li>
<li>Negative margins can potentially trip up some older versions of IE</li>
</ul>
<p>I&#8217;d encourage you to read both articles I linked to above as they offer more details than I am here. Both contain code for using this method with a third column and Thierry&#8217;s article talks about setting up borders between the columns.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/equal-height-columns/offset-columns.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/028ee_offset-containers.png" alt="Equal height columns with offset containers" width="465" height="210" /></a></p>
<h2>Offset Columns and Containers</h2>
<p>This last method is one created by <a href="http://matthewjamestaylor.com/blog/equal-height-columns-cross-browser-css-no-hacks">Matthew James Taylor</a>. Of all the methods presented here this one will work under the most use cases.</p>
<p>I&#8217;ve saved it for the end since it&#8217;s a little more complex and you might need to read through it a few times to understand how it works.</p>
<h3>The html</h3>
<p>The html is similar to what we&#8217;ve seen above though you&#8217;ll note an extra container div to what we&#8217;ve seen before.</p>
<pre>
<span>&lt;div id=<span>&quot;container-outer&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;container-inner&quot;</span>&gt;</span>
		<span>&lt;div id=<span>&quot;sidebar&quot;</span>&gt;</span>
			<span>&lt;p&gt;</span>Sidebar<span>&lt;/p&gt;</span>
		<span>&lt;/div&gt;</span>
		<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
			<span>&lt;p&gt;</span>Main content<span>&lt;/p&gt;</span>
		<span>&lt;/div&gt;</span>
	<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>As with the other methods we&#8217;ll use these containers to set background colors that will appear as though they belong to our columns.</p>
<h3>The css</h3>
<p>There&#8217;s a lot more going on here than what we&#8217;ve seen to this point. Both #sidebar and #content are floated left and given a width, but beyond that just about everything else is new.</p>
<p>The key to this method is the idea that a floated container will always be the same height as its floated content. By floating all of our columns inside all of the floated containers we ensure our container divs will always be equal in height to the tallest column.</p>
<pre>
<span>#container-outer {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>overflow</span><span>:</span><span> hidden</span><span>;</span>
	<span>background</span><span>:</span><span> #eee</span><span>;</span>
<span>}</span>
<span>#container-inner {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>background</span><span>:</span><span> #555</span><span>;</span>
	<span>position</span><span>:</span><span> relative</span><span>;</span>
	<span>right</span><span>:</span><span>75%</span><span>;</span>
<span>}</span>
<span>#sidebar {</span>
	<span>float</span><span>:</span><span> left</span><span>;</span>
	<span>width</span><span>:</span><span> 25%</span><span>;</span>
	<span>position</span><span>:</span><span> relative</span><span>;</span>
	<span>left</span><span>:</span><span> 75%</span><span>;</span>
<span>}</span>
<span>#content {</span>
	<span>float</span><span>:</span><span> left</span><span>;</span>
	<span>width</span><span>:</span><span> 75%</span><span>;</span>
	<span>position</span><span>:</span><span> relative</span><span>;</span>
	left: 75%
<span>}</span>
</pre>
<p>The first step here is to float both the columns and the containers. I have everything floated to the left, but the direction isn&#8217;t important. Use whatever direction you need for your layout.</p>
<p>The next step is setting backgrounds on the 2 container divs. Here I&#8217;ve set the background on the inner container to be the one we want on the sidebar and the outer container background to what we want on the main content.</p>
<p>If we stop here we&#8217;ll only see the background on the inner div since it&#8217;s higher in the stacking order than the outer div.</p>
<p>We need to a little <a href="http://www.vanseodesign.com/css/css-positioning/">css positioning</a> to shift the inner div so it shows only where we want the sidebar to display. That will allow the background on the outer div to show through behind where we want the content column to display.</p>
<pre>
<span>#container-inner {</span>
	<span>position</span><span>:</span><span> relative</span><span>;</span>
	<span>right</span><span>:</span><span> 75%</span><span>;</span>
<span>}</span>
</pre>
<p>We position the inner column and then set it&#8217;s right value to be 75% which is the same as the width of our content column.</p>
<p>Our backgrounds are now in place, however the content of both columns has also shifted 75% to the left. We need to shift it back into place.</p>
<pre>
<span>#sidebar {</span>
    <span>position</span><span>:</span><span> relative</span><span>;</span>
    left:75%
<span>}</span>
<span>#content {</span>
    <span>position</span><span>:</span><span> relative</span><span>;</span>
    left:75%
<span>}</span>
</pre>
<p>Once again we use relative positioning and because the content in both columns has been shifted 75% to the left we need to shift it back 75% to the right. We do that by setting the left value to 75%.</p>
<p>Now everything is back where it should be.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>Works regardless of which column is longer or shorter</li>
<li>Works with any kind of layout (fixed, fluid, elastic, etc)</li>
<li>Can handle as many columns as you want</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>A little more difficult to understand at first</li>
<li>Requires additional and non-<a href="http://www.vanseodesign.com/web-design/semantic-html/">semantic</a> container divs</li>
</ul>
<p>Overall this is the most foolproof method and the one guaranteed to work for any use case. I&#8217;d encourage you to play around with this one to really understand it and read through Matthew&#8217;s article a few times.</p>
<p>Matthew&#8217;s article walks through a 3 column layout and he has demos for both 4 and 5 columns as well. I chose to present a 2 column layout in the hopes it would make the concepts easier to understand.</p>
<h2>Additional Resources</h2>
<p>By no means are these the only methods for creating equal height columns. Chris Coyier shared a several other methods on CSS Tricks a few months back that you may prefer over those presented here.</p>
<ul>
<li><a href="http://css-tricks.com/fluid-width-equal-height-columns/">Fluid Width Equal Height Columns</a></li>
</ul>
<p>There are also plenty of other methods you can find with a little searching. Between this article and Chris&#8217; I think most of the more common methods are covered.</p>
<p><a href="http://www.flickr.com/photos/mukluk/173487714/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/2a1ac_columns-3.jpg" alt="Two standing columns at the ruins of a Roman theatre in Arles" width="465" height="349" /></a></p>
<h2>Summary</h2>
<p>Equal height columns are a desirable design trait, but they haven&#8217;t always been easy to create with <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-2/">css layouts</a>. Ideally we&#8217;d be able to use something like height: 100% and be done with it, but for now we can use any of the methods mentioned above.</p>
<p><strong>Faux columns</strong> are easy to set up, but they require an extra http request for the image and any change to the layout requires a new image.</p>
<p><strong>Pseudo columns</strong> are even easier, but have a limited use case where the relative heights of both columns are known and consistent across pages.</p>
<p><strong>Borders and negative margins</strong> are relatively easy to work with, require no foreknowledge of column heights and better adapt to multiple columns. They require one column be fixed width.</p>
<p><strong>Offset columns and containers</strong> work across the most cases. They require no foreknowledge of column heights and can work with as many columns as you want. The method is a little more complex than the other methods.</p>
<p>In time I expect a much simpler standard css solution, but until then these 4 methods should suffice for your project.</p>
<p>Do you design equal height css column layouts often? What method for creating the columns to use when you do?</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/3dd80_?ak_action=api_record_view&amp;id=2983&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/e2oHKFe2p-uZ7tEu8bacz2cXZWk/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/197f3_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/e2oHKFe2p-uZ7tEu8bacz2cXZWk/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/197f3_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/b24bf_VQEoYQysSqU" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-methods-for-creating-equal-height-columns-in-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Geek Transportation Systems</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/geek-transportation-systems/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/geek-transportation-systems/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 02:52:10 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[funny]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[dangerous fun]]></category>
		<category><![CDATA[fog creek software]]></category>
		<category><![CDATA[forms of transportation]]></category>
		<category><![CDATA[greatest weakness]]></category>
		<category><![CDATA[having children]]></category>
		<category><![CDATA[rear foot]]></category>
		<category><![CDATA[solid construction]]></category>
		<category><![CDATA[top choice]]></category>
		<category><![CDATA[wheeled vehicle]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/geek-transportation-systems/</guid>
		<description><![CDATA[On my first visit to the Fog Creek Software offices in 2008, I was surprised to see programmers zooming around the office on scooters. I didn&#8217;t realize that scooters were something geeks would be into, but it sure looked like fun, albeit borderline dangerous fun, on the 25th floor of an office building in Manhattan. [...]]]></description>
			<content:encoded><![CDATA[<p>
On my first visit to the Fog Creek Software offices in 2008, I was surprised to see programmers zooming around the office on scooters. I didn&#8217;t realize that scooters were something geeks would be into, but it sure looked like fun, albeit borderline <i>dangerous</i> fun, on the 25th floor of an office building in Manhattan.</p>
<p>
It turns out that having children is a great <s>excuse</s> reason to get into fun things like scooters. I didn&#8217;t know much about scooters for adults, so being an obsessive geek, of course I had to research the heck out of this topic. My research turned up the <a href="http://www.amazon.com/gp/product/B001LUQGYC/codinghorror-20">Xootr MG</a> as a top choice.</p>
<p>
<a href="http://www.amazon.com/gp/product/B001LUQGYC/codinghorror-20"><img alt="Xootr-mg-scooter" src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/c5b54_6a0120a85dcdae970b01538f170506970b-800wi" border="0" /></a></p>
<p>
News flash: scooters <i>are</i> fun. Really fun!</p>
<p>
But per my research (and now, personal experience) <b>scooters are also surprisingly practical forms of transportation in certain situations</b>, namely when &hellip;</p>
<ul>
<li>you need to travel 1-3 miles</li>
<li>the route is not too hilly</li>
<li>it is not raining or wet</li>
<li>the route is mostly paved or has sidewalks</li>
<li>you are comfortable being &#8220;that awkward looking guy on a scooter&#8221;</li>
</ul>
<p>
Scooters are <i>very</i> primitive machines; it is both their greatest strength and their greatest weakness. It&#8217;s arguably the simplest personal wheeled vehicle there is. In these short distance scenarios, scooters tend to win over, say, bicycles because there&#8217;s less setup and teardown necessary &ndash; you don&#8217;t have to lock up a scooter, nor do you have to wear a helmet (though I highly recommend one). Just hop on and go! You get almost all the benefits of gravity and wheeled efficiency with a minimum of fuss and maintenance. And yes, it&#8217;s fun, too!</p>
<p>
I&#8217;m just a scooter newbie, but the <a href="http://www.amazon.com/gp/product/B001LUQGYC/codinghorror-20">Xootr MG</a> has a few characteristics I liked a lot, including rock-solid construction, a front brake (not super efficient, but reasonably effective when combined with the rear foot fender brake), and a wide, comfortable platform for your feet. But it does take some effort to kick around &ndash; don&#8217;t forget to alternate your legs &ndash; and the ride can be rough at times depending on the surface. Large bumps and very uneven surfaces are wreck material. And going uphill on a scooter, beyond the absolute wussiest and mildest of grades, is simply out of the question.</p>
<p>
For longer distances, or if the terrain is rougher or hillier, a scooter might work, but it&#8217;d be a tough way to travel. What you need in those cases is a small, portable bicycle &ndash; one you can take with you. I&#8217;ve dabbled in foldable bicycles before, and we own two <a href="http://www.amazon.com/gp/search?ie=UTF8&amp;keywords=dahon%20folding%20bicycle&amp;tag=codinghorror-20">Dahon folding bicycles</a>. They&#8217;re great, versatile and inexpensive bikes. </p>
<p>
<a href="http://www.amazon.com/gp/search?ie=UTF8&amp;keywords=dahon%20folding%20bicycle&amp;tag=codinghorror-20"><img alt="New-foldable-bikes" src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/a3ff9_6a0120a85dcdae970b01538f17003b970b-800wi" border="0" /></a></p>
<p>
Dahon makes fine traditional folding bicycles, but they are not quite as pick-up-and-go as I would like for short trips. As an experiment, I purchased something I&#8217;ve had my eye on for a long time: the <a href="http://www.amazon.com/gp/product/B003BO4PKI/codinghorror-20">Strida LT</a> folding bicycle. Or, as I like to call it, my &#8220;mid-life crisis vehicle&#8221;.</p>
<p>
<a href="http://www.amazon.com/gp/product/B003BO4PKI/codinghorror-20"><img alt="Strida-green-side" src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e5d35_6a0120a85dcdae970b01538f17503f970b-800wi" border="0" /></a></p>
<p>
(also pictured: some cool accessories that I recommend for Strida owners: a Cateye Reflex rear LED light on the rack, Knog beetle silicone front LED light on the handlebars, and a Sunlite Bicycle bungie cargo net.)</p>
<p>
The appeal of the Strida is that it folds down to an <i>incredibly</i> small size. </p>
<p>
<a href="http://www.amazon.com/gp/product/B003BO4PKI/codinghorror-20"><img class="asset  asset-image at-xid-6a0120a85dcdae970b014e890a8d60970d image-full" alt="Strida-green-folded" src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/1ff43_6a0120a85dcdae970b014e890a8d60970d-800wi" border="0" /></a></p>
<p>
It&#8217;s almost a pogo stick in folded form. I took my Strida on a short trip into San Francisco for a speaking gig in the city, which involved riding on BART, and the Strida in practice is <b>everything I dreamed a modern ultra-portable folding bicycle could be</b>:</p>
<ul>
<li>front and rear disc brakes; superb stoppers
<li>belt drive so no grease on your hands or pants
<li>built in fenders in case you encounter puddles or rain
<li>comfortable, full size(ish) upright riding position
<li>super-easy, crazy fast folding: <a href="http://www.youtube.com/watch?v=y0qx95hxyuQ">five seconds, no kidding!</a>
<li>when folded, the bike can be propped by the rear rack (as pictured) or strolled along by rolling it on its wheels.
</ul>
<p>
The Strida may look odd, and perhaps it is odd, but I found it to be shockingly close to an ideal go-anywhere do-anything convenience bicycle. It isn&#8217;t perfect, of course:</p>
<ul>
<li>My only real beef with the Strida: the seat adjustment is <i>horrendously</i> kludgey. Adjusting the seat height on a Strida is painfully awkward even in the garage; on the go it&#8217;s not an option.
<li>It is a small wheel bicycle, with all the unavoidable physical compromises that entails. It&#8217;ll always be a little twitchy and not something you would want to go on a 10 or 20 mile ride with.
<li>It&#8217;s a single speed, and you&#8217;re not supposed to stand out of the saddle for power pedaling at any time. The frame and belt drive won&#8217;t take it. On anything other than a moderate uphill you&#8217;ll need to hop off and walk. (There is a slightly fancier Strida that has two internal hub gears, but I know nothing about it.)
<li>Because the fold involves a ball joint, it <i>is</i> possible to permanently damage the bike if you aren&#8217;t careful when you fold and force it. I doubt this is a real concern for anyone who has folded a Strida more than once, but if a ham-fisted friend tries to fold your Strida to &#8220;test it out&#8221;, you might be in trouble.
</ul>
<p>
None of these criticisms apply to the Dahon, so hopefully you can get a sense of the dividing line between an ultra-folder and a plain old folding bicycle.</p>
<p>
Being a geek, it&#8217;s <a href="http://www.codinghorror.com/blog/2007/10/geek-diet-and-exercise-programs.html">not like I spend a lot of time outdoors</a>. But when I do venture outside, I like to travel in a manner befitting a geek. That is, with my <a href="http://www.codinghorror.com/blog/2010/08/whats-on-your-utility-belt.html">utility belt fully equipped</a>, and in the <i>dorkiest, most efficient vehicle possible</i> for a trip of that particular length. Scooters, folding bicycles, recumbents, pogo sticks &hellip; whatever it takes. If you, too, would like to geek out around town, consider adding the <a href="http://www.amazon.com/gp/product/B001LUQGYC/codinghorror-20">Xootr MG scooter</a> and <a href="http://www.amazon.com/gp/product/B003BO4PKI/codinghorror-20">Strida LT folding bicycle</a> to your stable of geek transportation systems.</p>
<p>
<a href="http://feeds.feedburner.com/codinghorror">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/geek-transportation-systems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>4 Types of Grids And When Each Works Best</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-types-of-grids-and-when-each-works-best-3/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-types-of-grids-and-when-each-works-best-3/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:11:36 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[column grid]]></category>
		<category><![CDATA[distinct types]]></category>
		<category><![CDATA[girds]]></category>
		<category><![CDATA[grid structure]]></category>
		<category><![CDATA[grid types]]></category>
		<category><![CDATA[rectangular area]]></category>
		<category><![CDATA[secondary structure]]></category>
		<category><![CDATA[text blocks]]></category>
		<category><![CDATA[visual interest]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-types-of-grids-and-when-each-works-best-3/</guid>
		<description><![CDATA[Last week I posted the anatomy of a gird and touched on what each part of a grid is and does. Parts like columns and modules, gutters and margins can be combined in different ways to form distinct types of grids. Today I want to look at 4 grid types and when you might use [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I posted the <a href="http://www.vanseodesign.com/web-design/grid-anatomy">anatomy of a gird</a> and touched on what each part of a grid is and does. Parts like columns and modules, gutters and margins can be combined in different ways to form distinct types of grids.<br />
<span></span><br />
Today I want to look at 4 grid types and when you might use each.</p>
<ul>
<li>Manuscript grid</li>
<li>Column grid</li>
<li>Modular grid</li>
<li>Hierarchical grid</li>
</ul>
<p>Ideally by the end of this post you&#8217;ll have a better idea why you might choose one <a href="http://www.thinkingwithtype.com/contents/grid/">type of grid</a> over another for a particular project.</p>
<p>I&#8217;ll be referring to various grid parts throughout so if those parts are unfamiliar you may want to visit the<a href="http://www.vanseodesign.com/web-design/grid-anatomy"> anatomy of a grid</a> post.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/cca5b_manuscript-grid.png" alt="Manuscript grid" width="465" height="500" /></p>
<h2>Manuscript Grid</h2>
<p>Sometimes called a block grid or single column grid, the manuscript grid is the simplest grid <a href="http://www.vanseodesign.com/web-design/structures-patterns-textures/">structure</a>. It&#8217;s mainly a large rectangular area taking up most of the space inside a format.</p>
<p>The primary structure is defined by large text blocks and margins, which position the block within the format. Its secondary structure defines the location and proportions of folios, footnotes, running headers, and other secondary information.</p>
<p><a href="http://finearts.fontbonne.edu/tech/layout/grid_type.html">Manuscript girds</a> are good for extensive and continuous blocks of text. They&#8217;re used in books and long essays and perhaps lend themselves well to blog posts. They aren&#8217;t limited to text though. Images can be used to fill the block.</p>
<p>By adjusting the margins designers can help create interest. More opportunity for this exists where two page spreads are used as in magazines or books, but even on a single page interest can be created through margins alone.</p>
<ul>
<li><strong>Wider margins</strong> &mdash;  lead to narrower text blocks, which helps <a href="http://www.vanseodesign.com/web-design/dominance/">focus the eye</a> on the text and creates a sense of calm and stability. </li>
<li><strong>Narrower margins</strong> &mdash;  force the text block to the edge of the format creating tension as the two near each other.</li>
</ul>
<p><a href="http://www.vanseodesign.com/web-design/symmetry-asymmetry/">Asymmetrically</a> placed text blocks add visual interest and leave a larger block of whitespace on one side to allow the eye to rest.</p>
<p>Because of the simplicity of manuscript grids, typography plays an important role in creating visual interest. Your choice of typeface, font-size, leading, measure, hierarchy, etc will make up most of your design choices.</p>
<p>Given the name we naturally associate manuscript grids with the printed page, however if you think of any <a href="http://www.vanseodesign.com/css/2-column-layout-code/">fixed width layout</a> it&#8217;s essentially one large block located within a format (the browser window).</p>
<p>Designers typically center these layouts, but with the above ideas in mind perhaps there are better places to locate your layout.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/cca5b_column-grid.png" alt="Column grid" width="465" height="500" /></p>
<h2>Column Grids</h2>
<p>When people think of grids, especially online, they likely think of column grids. As you would expect column grids are made up by placing multiple columns within the format.</p>
<p>Column grids are good when discontinuous information needs to be presented.</p>
<p>For example you might have various asides, pull quotes, etc in your design, which can occupy different columns in the grid. One column might be reserved for text, another for images, and yet another for image captions.</p>
<p>Columns can be dependent on each other, independent from each other, and crossed over by design elements. This leads to a large amount of flexibility when <a href="http://www.vanseodesign.com/web-design/organizing-information/">organizing information</a> on the page.</p>
<p>You can separate blocks of information by placing them in different columns and yet still show a connection between them. Perhaps text in one column and images and captions in different column next to the text the image relates to.</p>
<p>The width of a column should depend on some element internal to the design, most likely the size of the text.</p>
<p>A column should be able to accommodate a <a href="http://www.vanseodesign.com/web-design/legible-readable-typography/">comfortable measure</a> for reading and avoid excessive hyphenation at the end of lines. Too wide or narrow a column and reading becomes difficult.</p>
<h3>Column Gutters</h3>
<p>When the margins are wider than the gutters between columns the eye is guided inward and tension is eased. When margins are narrower than gutters the eye is directed outward and more tension is present.</p>
<p>There are no hard rules, but traditionally if the size of the gutter is x the margin is usually set to be 2x.</p>
<p>Flowlines can be used in column grids to help set the subordinate structure or to allow for unusual breaks in text and images. Hanglines and <a href="http://www.alistapart.com/articles/settingtypeontheweb/">baselines</a> can help establish where different elements will be positioned vertically within the columns.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/52607_modular-grid.png" alt="Modular grid" width="465" height="500" /></p>
<h2>Modular Grids</h2>
<p>Modular grids are like column girds with the addition of horizontal divisions marked by rows. The columns and rows and the gutters between each create a matrix of cells or modules.</p>
<p>Modular grids are good for complex projects that require more control than a column grid can offer. Image galleries and shopping carts are likely candidates for modular grids.</p>
<p>Modular girds lend themselves to the design of tabular information such as charts, forms, <a href="http://www.vanseodesign.com/css/simple-navigation-bar-with-css-and-xhtml/">navigation</a>, schedules, and of course tables of data. They can help standardize the space in tables and help integrate tables with any surrounding text or images.</p>
<p>Each module in the grid can define a small <a href="http://www.vanseodesign.com/web-design/depth-of-processing/">chunk of information</a> or adjacent modules can be combined to form fields or spatial zones each designated to hold a specific type of information.</p>
<p>Smaller modules allow for a more flexible grid with greater precision, but they can become confusing to work with. Imagine for example setting up a modular grid in which each modules is 1px by 1px. Lot&#8217;s of flexibility, but not much practical use.</p>
<p>Modules can be either horizontal or vertical and the proportion of a module can be determined in a variety of ways.</p>
<ul>
<li>Average width and height of a paragraph</li>
<li>Average image size</li>
<li>Ad unit size</li>
<li>Type proportions like leading and measure</li>
</ul>
<p>Margin proportions will ideally be considered at the same time as module and gutter proportions as each relates to and affects the others.</p>
<p>Large publishing systems that present information across a variety of formats often use modular grids to keep design proportions consistent. This can help a company maintain <a href="http://www.vanseodesign.com/branding/brand-asset/">brand consistency</a>.</p>
<p>Aside from their practical uses, modular grids have developed an aesthetic image.</p>
<p>Between 1950 and 1980 they became associated with an ideal social and political order that has its roots in rationalism. The Bauhaus and Swiss style celebrate objectivity, order, and <a href="http://www.vanseodesign.com/web-design/why-minimalism/">minimalism</a> and turned to modular grids to maintain clarity in form.</p>
<p>This order and clarity can be used to create additional meaning. For example it often conveys a technical or urban feeling and naturally communicates mathematical information.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/52607_hierarchy-grid.png" alt="Hierarchical grid" width="465" height="300" /></p>
<h2> Hierarchical Grids</h2>
<p>Hierarchical grids are commonly found on the web. They&#8217;re based more on an intuitive placement of elements, which still conforms to the needs of the information.</p>
<p>Customized proportions are typically used in <a href="http://www.vanseodesign.com/web-design/visual-hierarchy/">hierarchical</a> grids instead of regularly repeated intervals. Column widths tend to vary as do the location of flowlines.</p>
<p>They can be thought of as loose organic grids. Development often begins by spontaneously placing design elements. Later a rational structure to coordinate those elements is determined.</p>
<p><a href="http://www.vanseodesign.com/web-design/counterpart-and-counterpoint-in-typographic-hierarchy/">Hierarchical</a> grids are good when a project requires an odd grid that doesn&#8217;t easily fit one of the other grid types and can be used to unify disparate elements and create a superstructure for organizing them.</p>
<p>If you&#8217;ve designed sites where you carefully align elements to each other without using one of the previous 3 grid types, you&#8217;re probably approaching a hierarchical grid structure in your design.</p>
<p><a href="http://www.amazon.com/Making-Breaking-Grid-Graphic-Workshop/dp/1592531253/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/c15fe_making-and-breaking-the-grid.png" alt="Book cover for 'Making and Breaking the Grid'" width="465" height="558" /></a></p>
<h2>Summary</h2>
<p>The 4 grids above are the main types of grids you&#8217;ll encounter. Each has a different function as far as holding content and choosing the right grid to use should come down to the content for your specific project.</p>
<ul>
<li><strong>Manuscript grids</strong> &mdash; are the simplest and they work well when presenting large continuous blocks of text or images.</li>
<li><strong>Column grids</strong> &mdash; work well when the information being presented is discontinuous and different types of information can be placed in different columns.</li>
<li><strong>Modular grids</strong> &mdash; work best for more complex problems where columns alone don&#8217;t offer enough flexibility.  The introduce horizontal spaces between blocks of content.</li>
<li><strong>Hierarchical girds</strong> &mdash; can be used when none of the above grids will work to solve the problem. They tend to be created organically by first placing design elements on the page and then finding a rational structure for presenting those elements.</li>
</ul>
<p>Hopefully everything above has helped you see that <a href="http://www.thegridsystem.org/">grids</a> come in different varieties and more importantly when you might choose one grid type over another. Each can be the appropriate choice for a website as each allows for variety within the grid.</p>
<p>If you currently work with grids which type of grid to you use most frequently?</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e1e95_?ak_action=api_record_view&amp;id=2974&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/MbmiNkyzWNxXpf5zjwcMNJVpRDk/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e1e95_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/MbmiNkyzWNxXpf5zjwcMNJVpRDk/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/fb151_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/73424_PPFv88zf8JU" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-types-of-grids-and-when-each-works-best-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>4 Types of Grids And When Each Works Best</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-types-of-grids-and-when-each-works-best-2/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-types-of-grids-and-when-each-works-best-2/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:11:08 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[column grid]]></category>
		<category><![CDATA[distinct types]]></category>
		<category><![CDATA[girds]]></category>
		<category><![CDATA[grid structure]]></category>
		<category><![CDATA[grid types]]></category>
		<category><![CDATA[rectangular area]]></category>
		<category><![CDATA[secondary structure]]></category>
		<category><![CDATA[text blocks]]></category>
		<category><![CDATA[visual interest]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-types-of-grids-and-when-each-works-best-2/</guid>
		<description><![CDATA[Last week I posted the anatomy of a gird and touched on what each part of a grid is and does. Parts like columns and modules, gutters and margins can be combined in different ways to form distinct types of grids. Today I want to look at 4 grid types and when you might use [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I posted the <a href="http://www.vanseodesign.com/web-design/grid-anatomy">anatomy of a gird</a> and touched on what each part of a grid is and does. Parts like columns and modules, gutters and margins can be combined in different ways to form distinct types of grids.<br />
<span></span><br />
Today I want to look at 4 grid types and when you might use each.</p>
<ul>
<li>Manuscript grid</li>
<li>Column grid</li>
<li>Modular grid</li>
<li>Hierarchical grid</li>
</ul>
<p>Ideally by the end of this post you&#8217;ll have a better idea why you might choose one <a href="http://www.thinkingwithtype.com/contents/grid/">type of grid</a> over another for a particular project.</p>
<p>I&#8217;ll be referring to various grid parts throughout so if those parts are unfamiliar you may want to visit the<a href="http://www.vanseodesign.com/web-design/grid-anatomy"> anatomy of a grid</a> post.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/5d15e_manuscript-grid.png" alt="Manuscript grid" width="465" height="500" /></p>
<h2>Manuscript Grid</h2>
<p>Sometimes called a block grid or single column grid, the manuscript grid is the simplest grid <a href="http://www.vanseodesign.com/web-design/structures-patterns-textures/">structure</a>. It&#8217;s mainly a large rectangular area taking up most of the space inside a format.</p>
<p>The primary structure is defined by large text blocks and margins, which position the block within the format. Its secondary structure defines the location and proportions of folios, footnotes, running headers, and other secondary information.</p>
<p><a href="http://finearts.fontbonne.edu/tech/layout/grid_type.html">Manuscript girds</a> are good for extensive and continuous blocks of text. They&#8217;re used in books and long essays and perhaps lend themselves well to blog posts. They aren&#8217;t limited to text though. Images can be used to fill the block.</p>
<p>By adjusting the margins designers can help create interest. More opportunity for this exists where two page spreads are used as in magazines or books, but even on a single page interest can be created through margins alone.</p>
<ul>
<li><strong>Wider margins</strong> &mdash;  lead to narrower text blocks, which helps <a href="http://www.vanseodesign.com/web-design/dominance/">focus the eye</a> on the text and creates a sense of calm and stability. </li>
<li><strong>Narrower margins</strong> &mdash;  force the text block to the edge of the format creating tension as the two near each other.</li>
</ul>
<p><a href="http://www.vanseodesign.com/web-design/symmetry-asymmetry/">Asymmetrically</a> placed text blocks add visual interest and leave a larger block of whitespace on one side to allow the eye to rest.</p>
<p>Because of the simplicity of manuscript grids, typography plays an important role in creating visual interest. Your choice of typeface, font-size, leading, measure, hierarchy, etc will make up most of your design choices.</p>
<p>Given the name we naturally associate manuscript grids with the printed page, however if you think of any <a href="http://www.vanseodesign.com/css/2-column-layout-code/">fixed width layout</a> it&#8217;s essentially one large block located within a format (the browser window).</p>
<p>Designers typically center these layouts, but with the above ideas in mind perhaps there are better places to locate your layout.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/0d495_column-grid.png" alt="Column grid" width="465" height="500" /></p>
<h2>Column Grids</h2>
<p>When people think of grids, especially online, they likely think of column grids. As you would expect column grids are made up by placing multiple columns within the format.</p>
<p>Column grids are good when discontinuous information needs to be presented.</p>
<p>For example you might have various asides, pull quotes, etc in your design, which can occupy different columns in the grid. One column might be reserved for text, another for images, and yet another for image captions.</p>
<p>Columns can be dependent on each other, independent from each other, and crossed over by design elements. This leads to a large amount of flexibility when <a href="http://www.vanseodesign.com/web-design/organizing-information/">organizing information</a> on the page.</p>
<p>You can separate blocks of information by placing them in different columns and yet still show a connection between them. Perhaps text in one column and images and captions in different column next to the text the image relates to.</p>
<p>The width of a column should depend on some element internal to the design, most likely the size of the text.</p>
<p>A column should be able to accommodate a <a href="http://www.vanseodesign.com/web-design/legible-readable-typography/">comfortable measure</a> for reading and avoid excessive hyphenation at the end of lines. Too wide or narrow a column and reading becomes difficult.</p>
<h3>Column Gutters</h3>
<p>When the margins are wider than the gutters between columns the eye is guided inward and tension is eased. When margins are narrower than gutters the eye is directed outward and more tension is present.</p>
<p>There are no hard rules, but traditionally if the size of the gutter is x the margin is usually set to be 2x.</p>
<p>Flowlines can be used in column grids to help set the subordinate structure or to allow for unusual breaks in text and images. Hanglines and <a href="http://www.alistapart.com/articles/settingtypeontheweb/">baselines</a> can help establish where different elements will be positioned vertically within the columns.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/0d495_modular-grid.png" alt="Modular grid" width="465" height="500" /></p>
<h2>Modular Grids</h2>
<p>Modular grids are like column girds with the addition of horizontal divisions marked by rows. The columns and rows and the gutters between each create a matrix of cells or modules.</p>
<p>Modular grids are good for complex projects that require more control than a column grid can offer. Image galleries and shopping carts are likely candidates for modular grids.</p>
<p>Modular girds lend themselves to the design of tabular information such as charts, forms, <a href="http://www.vanseodesign.com/css/simple-navigation-bar-with-css-and-xhtml/">navigation</a>, schedules, and of course tables of data. They can help standardize the space in tables and help integrate tables with any surrounding text or images.</p>
<p>Each module in the grid can define a small <a href="http://www.vanseodesign.com/web-design/depth-of-processing/">chunk of information</a> or adjacent modules can be combined to form fields or spatial zones each designated to hold a specific type of information.</p>
<p>Smaller modules allow for a more flexible grid with greater precision, but they can become confusing to work with. Imagine for example setting up a modular grid in which each modules is 1px by 1px. Lot&#8217;s of flexibility, but not much practical use.</p>
<p>Modules can be either horizontal or vertical and the proportion of a module can be determined in a variety of ways.</p>
<ul>
<li>Average width and height of a paragraph</li>
<li>Average image size</li>
<li>Ad unit size</li>
<li>Type proportions like leading and measure</li>
</ul>
<p>Margin proportions will ideally be considered at the same time as module and gutter proportions as each relates to and affects the others.</p>
<p>Large publishing systems that present information across a variety of formats often use modular grids to keep design proportions consistent. This can help a company maintain <a href="http://www.vanseodesign.com/branding/brand-asset/">brand consistency</a>.</p>
<p>Aside from their practical uses, modular grids have developed an aesthetic image.</p>
<p>Between 1950 and 1980 they became associated with an ideal social and political order that has its roots in rationalism. The Bauhaus and Swiss style celebrate objectivity, order, and <a href="http://www.vanseodesign.com/web-design/why-minimalism/">minimalism</a> and turned to modular grids to maintain clarity in form.</p>
<p>This order and clarity can be used to create additional meaning. For example it often conveys a technical or urban feeling and naturally communicates mathematical information.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/69930_hierarchy-grid.png" alt="Hierarchical grid" width="465" height="300" /></p>
<h2> Hierarchical Grids</h2>
<p>Hierarchical grids are commonly found on the web. They&#8217;re based more on an intuitive placement of elements, which still conforms to the needs of the information.</p>
<p>Customized proportions are typically used in <a href="http://www.vanseodesign.com/web-design/visual-hierarchy/">hierarchical</a> grids instead of regularly repeated intervals. Column widths tend to vary as do the location of flowlines.</p>
<p>They can be thought of as loose organic grids. Development often begins by spontaneously placing design elements. Later a rational structure to coordinate those elements is determined.</p>
<p><a href="http://www.vanseodesign.com/web-design/counterpart-and-counterpoint-in-typographic-hierarchy/">Hierarchical</a> grids are good when a project requires an odd grid that doesn&#8217;t easily fit one of the other grid types and can be used to unify disparate elements and create a superstructure for organizing them.</p>
<p>If you&#8217;ve designed sites where you carefully align elements to each other without using one of the previous 3 grid types, you&#8217;re probably approaching a hierarchical grid structure in your design.</p>
<p><a href="http://www.amazon.com/Making-Breaking-Grid-Graphic-Workshop/dp/1592531253/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/69930_making-and-breaking-the-grid.png" alt="Book cover for 'Making and Breaking the Grid'" width="465" height="558" /></a></p>
<h2>Summary</h2>
<p>The 4 grids above are the main types of grids you&#8217;ll encounter. Each has a different function as far as holding content and choosing the right grid to use should come down to the content for your specific project.</p>
<ul>
<li><strong>Manuscript grids</strong> &mdash; are the simplest and they work well when presenting large continuous blocks of text or images.</li>
<li><strong>Column grids</strong> &mdash; work well when the information being presented is discontinuous and different types of information can be placed in different columns.</li>
<li><strong>Modular grids</strong> &mdash; work best for more complex problems where columns alone don&#8217;t offer enough flexibility.  The introduce horizontal spaces between blocks of content.</li>
<li><strong>Hierarchical girds</strong> &mdash; can be used when none of the above grids will work to solve the problem. They tend to be created organically by first placing design elements on the page and then finding a rational structure for presenting those elements.</li>
</ul>
<p>Hopefully everything above has helped you see that <a href="http://www.thegridsystem.org/">grids</a> come in different varieties and more importantly when you might choose one grid type over another. Each can be the appropriate choice for a website as each allows for variety within the grid.</p>
<p>If you currently work with grids which type of grid to you use most frequently?</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/a6874_?ak_action=api_record_view&amp;id=2974&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/MbmiNkyzWNxXpf5zjwcMNJVpRDk/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/2cf73_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/MbmiNkyzWNxXpf5zjwcMNJVpRDk/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/2cf73_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/1479c_PPFv88zf8JU" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-types-of-grids-and-when-each-works-best-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>2 Methods For Developing Hybrid CSS Layouts</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-methods-for-developing-hybrid-css-layouts-2/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-methods-for-developing-hybrid-css-layouts-2/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:10:21 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[appearance]]></category>
		<category><![CDATA[attempts]]></category>
		<category><![CDATA[div id]]></category>
		<category><![CDATA[divs]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[layouts]]></category>
		<category><![CDATA[lt]]></category>
		<category><![CDATA[max width]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-methods-for-developing-hybrid-css-layouts-2/</guid>
		<description><![CDATA[Over the last few weeks we&#8217;ve seen how to develop both fixed width and fluid layouts with html and css. Each has its pros as well as its cons. Hybrid layouts are attempts to gain the pros of one type of layout while minimizing some of the cons. Today I want to present 2 hybrid [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last few weeks we&#8217;ve seen how to develop both <a href="http://www.vanseodesign.com/css/2-column-layout-code/">fixed width</a> and <a href="http://www.vanseodesign.com/css/fluid-layout-code/">fluid layouts</a> with html and css. Each has its pros as well as its cons. Hybrid layouts are attempts to gain the pros of one type of layout while minimizing some of the cons.<br />
<span></span><br />
Today I want to present 2 hybrid layouts. The first is a modified fixed width layout that gives the appearance of being fluid and the second is a modified fluid layout that attempts to rein in the longer lines of text.</p>
<p>These aren&#8217;t the only 2 hybrid layouts, but hopefully they point the way toward techniques you can use to create your own hybrid layouts.</p>
<p>As always if you simply want the code here are the demos</p>
<ul>
<li><a href="http://www.vanseodesign.com/blog/demo/hybrid-css-layout/fixed-content-fluid-background.php">Fixed content and fluid background</a></li>
<li><a href="http://www.vanseodesign.com/blog/demo/hybrid-css-layout/fluid-2-max-width.php"> 2 column fluid layout with max-width</a></li>
<li><a href="http://www.vanseodesign.com/blog/demo/hybrid-css-layout/fluid-3-max-width.php"> 3 column fluid layout with max-width</a></li>
</ul>
<p><a href="http://www.vanseodesign.com/blog/demo/hybrid-css-layout/fixed-content-fluid-background.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/c2fbc_fixed-content-fluid-background.png" alt="Layout with fixed content and fluid background" width="465" height="210" /></a></p>
<h2>Fixed Width Content, Fluid Background</h2>
<p>The trick to this layout is to use container divs around each row of content within our layout.</p>
<p>This allows us to use the inner div for fixing the width and centering what&#8217;s within while allowing the the outer div to stretch from edge to edge in the browser.</p>
<p>By setting <a href="http://www.vanseodesign.com/css/css-background-property/">backgrounds</a> on the outer div we give the appearance that the layout is fluid, while we maintain control over the content itself. In a sense we create a layout within the layout. This inner layout is fixed, while the outer layout is fluid.</p>
<h3>The HTML</h3>
<p>The html below is similar to the fixed width layouts we&#8217;ve previously discussed.</p>
<pre>
<span>&lt;div id=<span>&quot;header-container&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;header&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Header content here<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;page&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Main content<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;sidebar&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Sidebar<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;footer-container&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Footer: <span>&lt;/p&gt;</span>
	<span>&lt;div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>The difference is that in the fixed-width layouts we wrapped everything with a single container div. Here we&#8217;re wrapping each row of content with a container.</p>
<p>Both header and footer are wrapped with a container div and since the content and sidebar are meant to be displayed next to each other (on a single row in the layout) a single container is used around both.</p>
<p>You might note that while #header and #footer are inner divs, #page is apparently an outer div. We&#8217;ll actually use the body as the outer div for #page instead of adding an additional #page-container div.</p>
<p>These multiple container divs are the key to this layout.</p>
<h3>The CSS</h3>
<p>If you&#8217;ve been following along with this series of posts on <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-1/">css layouts</a> most of this css should also be familiar, though there are some new things which we&#8217;ll talk about below.</p>
<pre>
<span>#header-container, #footer-container {</span><span>background</span><span>:</span><span> #777</span><span>;</span><span>}</span>
<span>#page, #header, #footer {</span>
	<span>width</span><span>:</span><span>960px</span><span>;</span>
	<span>margin</span><span>:</span><span>0 auto</span><span>;</span>
<span>}</span>
<span>#content {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>620px</span><span>;</span>
<span>}</span>
<span>#sidebar {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>340px</span><span>;</span>
<span>}</span>
<span>#footer-container {</span>
	<span>clear</span><span>:</span><span>both</span><span>;</span>
<span>}</span>
</pre>
<p>#content and #sidebar are exactly the same as in the fixed width layouts we&#8217;ve seen before. Here I&#8217;ve cleared #footer-container instead of #footer, but that&#8217;s not really new. The new stuff is the css at the top.</p>
<p>Previously we had a single container div that fixed the width and <a href="http://www.vanseodesign.com/css/centering-with-css/">centered the content</a>. Here we have three, #page, #header, and #footer. Note that we&#8217;re fixing and centering the inner divs. Remember #page is the inner div with body being its container.</p>
<p>By default #header-container and #footer-container have a width that&#8217;s 100% of the body, which is what we want. All we really need to do is set backgrounds on each.</p>
<p>Since our footer and header divs have no background applied to them the background of their containers will show through. Similarly we can set a background on the body. I didn&#8217;t set it here since I want the body and the #page row to be white, which they will be by default.</p>
<p>As long as we don&#8217;t set a backgrounds on the divs holding the content the background of their containers will show through giving the appearance of fluidity.</p>
<p><a href="http://www.vanseodesign.com/css/understanding-css-floats/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/0d0f0_2-column-layout.png" alt="2 column layout showing floated elements and normal document flow elements" width="465" height="276" /></a></p>
<h3>Additional Thoughts</h3>
<p>While this layout does create a more fluid feel to a fixed width layout, the downside is the extra html used for all the container divs and that the fluid feel is something of an illusion as most of the design is still fixed.</p>
<p>Still it&#8217;s a nice compromise between fixed and fluid layouts.</p>
<p><strong>Note:</strong> Soh Tanaka has a slightly different method for achieving this same layout. The basic idea is the same, but Soh uses two classes, one fluid and one fixed. To control the layout you apply the appropriate class to the appropriate div.</p>
<p>I&#8217;d encourage you to read his post on <a href="http://www.sohtanaka.com/web-design/achieving-liquid-backgrounds-with-fixed-content/">achieving liquid background with fixed content</a>.</p>
<p>The minor downside to his method is it leaves behind <a href="http://www.vanseodesign.com/web-design/semantic-html/">non-semantic class names</a> in your html, which you may or may not be comfortable doing. </p>
<h2>Rearranging Columns</h2>
<p>Rearranging columns is exactly the same as it was for the fixed width and fluid layouts. Depending on how many columns and how you have things set up in your html it&#8217;s simply a matter of changing float directions for most cases.</p>
<p>For the cases when floats alone won&#8217;t do we need to use a small bit of <a href="http://www.vanseodesign.com/css/css-positioning/">relative and absolute positioning</a> to achieve the desired column order.</p>
<p>Since we&#8217;ve been over it before I won&#8217;t cover the details here and instead point you to the <a href="http://www.vanseodesign.com/css/3-column-layout-code/">3 column fixed width layout</a> post where the details are discussed.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/hybrid-css-layout/fluid-2-max-width.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/81a36_fluid-2-max-width.png" alt="2 column fluid layout with max-width applied" width="465" height="271" /></a></p>
<h2>Fluid Layout With Max Width Content</h2>
<p>The second hybrid layout we&#8217;ll look at starts with a fluid layout and uses max-width values to keep the lines of text from growing too long for comfortable reading.</p>
<h3>The HTML</h3>
<p>The html is exactly the same we used when developing fully fluid layouts.</p>
<pre>
<span>&lt;div id=<span>&quot;header&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Header<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Content<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;sidebar&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Sidebar<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Footer<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>There&#8217;s really nothing new in the html.</p>
<h3>The CSS</h3>
<p>The css should also look familiar. It&#8217;s the same we used when developing fluid layouts with one addition.</p>
<pre>
#content {
	float:left;
	width:67%;
}
#sidebar {
	float:left;
	width:33%;
}
#footer {
	clear:both;
}
#content p, #sidebar p {max-width: 75%}
</pre>
<p>The addition is the last line above where we&#8217;ve set all paragraphs inside the content and the sidebar to have a max-width of 75% of its parent container.</p>
<p>The amount is somewhat arbitrary. I chose 75% since it works well with the demo and the resolution of my laptop. What you use in practice would depend on your particular layout and audience.</p>
<p>You aren&#8217;t limited to setting max-width on paragraphs, however, since we&#8217;re mainly setting it to <a href="http://www.vanseodesign.com/web-design/legible-readable-typography/">prevent lines of text from growing too long</a>, paragraphs are probably the best place.</p>
<p>As headers and footers usually hold different kinds of content I didn&#8217;t set max-width inside either of them here. You might depending on the specifics of your design. The key is setting a max-width wherever content can grow to wide.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/bc18e_lafayette-lake-016.jpg" alt="Lake in Lafayette, Colorado" width="465" height="349" /></p>
<h3>Additional Thoughts</h3>
<p>In setting max-widths on our fluid layout we&#8217;re combating one of the prime downsides of fully fluid layouts, that of text lines growing too long. I set the max-width in % here, but on larger monitors this could still lead to overly long line lengths.</p>
<p>For this reason it might make more sense to use px instead of %. Of course using absolute measurements moves us away from fluid design.</p>
<p>Another point to note is that by setting a max-width on the content we create a greater amount of internal <a href="http://www.vanseodesign.com/web-design/whitespace/">whitespace</a> in the design. The larger the browser the more space will be present between blocks of content.</p>
<p>In the demo I gave additional padding to the content and sidebar to help balance out the additional <a href="http://www.vanseodesign.com/web-design/design-space/">space in the design</a>, though it&#8217;s hardly a perfect solution.</p>
<p>Overall using max-width is a nice way to achieve a fluid layout while still retaining a measure of control over the layout of the content.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/hybrid-css-layout/fluid-3-max-width.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/bc18e_fluid-3-max-width.png" alt="3 column fluid layout with max-width applied" width="465" height="250" /></a></p>
<h2>Summary</h2>
<p>Both fixed width and fully fluid <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-2/">css layouts have their pros and cons</a>. Hybrid layouts are an attempt to rein in some of the cons while keeping the pros.</p>
<p>A layout where the content is fixed and the background is fluid attempts to make fixed width layouts appear more fluid than they really are. They maintain control over the layout of the content, while adding fluidity to the background.</p>
<p>A fluid layout with max-width selectively applied attempts to rein in the possibility of longer lines of text while still allowing the overall design to be fluid and resize itself when the browser window is resized.</p>
<p>These aren&#8217;t the only hybrid layout solutions, but they are among the more common. Hopefully the techniques shown here will help you develop your own hybrid layouts when needed.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e75c6_?ak_action=api_record_view&amp;id=2969&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/6GyJNc6fHvZ9HM-wJJl8Ara-a8o/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e75c6_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/6GyJNc6fHvZ9HM-wJJl8Ara-a8o/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/85143_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/d2e0a_OlpADvpK72A" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-methods-for-developing-hybrid-css-layouts-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>4 Types of Grids And When Each Works Best</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-types-of-grids-and-when-each-works-best/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-types-of-grids-and-when-each-works-best/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:10:12 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[column grid]]></category>
		<category><![CDATA[distinct types]]></category>
		<category><![CDATA[girds]]></category>
		<category><![CDATA[grid structure]]></category>
		<category><![CDATA[grid types]]></category>
		<category><![CDATA[rectangular area]]></category>
		<category><![CDATA[secondary structure]]></category>
		<category><![CDATA[text blocks]]></category>
		<category><![CDATA[visual interest]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-types-of-grids-and-when-each-works-best/</guid>
		<description><![CDATA[Last week I posted the anatomy of a gird and touched on what each part of a grid is and does. Parts like columns and modules, gutters and margins can be combined in different ways to form distinct types of grids. Today I want to look at 4 grid types and when you might use [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I posted the <a href="http://www.vanseodesign.com/web-design/grid-anatomy">anatomy of a gird</a> and touched on what each part of a grid is and does. Parts like columns and modules, gutters and margins can be combined in different ways to form distinct types of grids.<br />
<span></span><br />
Today I want to look at 4 grid types and when you might use each.</p>
<ul>
<li>Manuscript grid</li>
<li>Column grid</li>
<li>Modular grid</li>
<li>Hierarchical grid</li>
</ul>
<p>Ideally by the end of this post you&#8217;ll have a better idea why you might choose one <a href="http://www.thinkingwithtype.com/contents/grid/">type of grid</a> over another for a particular project.</p>
<p>I&#8217;ll be referring to various grid parts throughout so if those parts are unfamiliar you may want to visit the<a href="http://www.vanseodesign.com/web-design/grid-anatomy"> anatomy of a grid</a> post.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/cc4a3_manuscript-grid.png" alt="Manuscript grid" width="465" height="500" /></p>
<h2>Manuscript Grid</h2>
<p>Sometimes called a block grid or single column grid, the manuscript grid is the simplest grid <a href="http://www.vanseodesign.com/web-design/structures-patterns-textures/">structure</a>. It&#8217;s mainly a large rectangular area taking up most of the space inside a format.</p>
<p>The primary structure is defined by large text blocks and margins, which position the block within the format. Its secondary structure defines the location and proportions of folios, footnotes, running headers, and other secondary information.</p>
<p><a href="http://finearts.fontbonne.edu/tech/layout/grid_type.html">Manuscript girds</a> are good for extensive and continuous blocks of text. They&#8217;re used in books and long essays and perhaps lend themselves well to blog posts. They aren&#8217;t limited to text though. Images can be used to fill the block.</p>
<p>By adjusting the margins designers can help create interest. More opportunity for this exists where two page spreads are used as in magazines or books, but even on a single page interest can be created through margins alone.</p>
<ul>
<li><strong>Wider margins</strong> &mdash;  lead to narrower text blocks, which helps <a href="http://www.vanseodesign.com/web-design/dominance/">focus the eye</a> on the text and creates a sense of calm and stability. </li>
<li><strong>Narrower margins</strong> &mdash;  force the text block to the edge of the format creating tension as the two near each other.</li>
</ul>
<p><a href="http://www.vanseodesign.com/web-design/symmetry-asymmetry/">Asymmetrically</a> placed text blocks add visual interest and leave a larger block of whitespace on one side to allow the eye to rest.</p>
<p>Because of the simplicity of manuscript grids, typography plays an important role in creating visual interest. Your choice of typeface, font-size, leading, measure, hierarchy, etc will make up most of your design choices.</p>
<p>Given the name we naturally associate manuscript grids with the printed page, however if you think of any <a href="http://www.vanseodesign.com/css/2-column-layout-code/">fixed width layout</a> it&#8217;s essentially one large block located within a format (the browser window).</p>
<p>Designers typically center these layouts, but with the above ideas in mind perhaps there are better places to locate your layout.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/cc4a3_column-grid.png" alt="Column grid" width="465" height="500" /></p>
<h2>Column Grids</h2>
<p>When people think of grids, especially online, they likely think of column grids. As you would expect column grids are made up by placing multiple columns within the format.</p>
<p>Column grids are good when discontinuous information needs to be presented.</p>
<p>For example you might have various asides, pull quotes, etc in your design, which can occupy different columns in the grid. One column might be reserved for text, another for images, and yet another for image captions.</p>
<p>Columns can be dependent on each other, independent from each other, and crossed over by design elements. This leads to a large amount of flexibility when <a href="http://www.vanseodesign.com/web-design/organizing-information/">organizing information</a> on the page.</p>
<p>You can separate blocks of information by placing them in different columns and yet still show a connection between them. Perhaps text in one column and images and captions in different column next to the text the image relates to.</p>
<p>The width of a column should depend on some element internal to the design, most likely the size of the text.</p>
<p>A column should be able to accommodate a <a href="http://www.vanseodesign.com/web-design/legible-readable-typography/">comfortable measure</a> for reading and avoid excessive hyphenation at the end of lines. Too wide or narrow a column and reading becomes difficult.</p>
<h3>Column Gutters</h3>
<p>When the margins are wider than the gutters between columns the eye is guided inward and tension is eased. When margins are narrower than gutters the eye is directed outward and more tension is present.</p>
<p>There are no hard rules, but traditionally if the size of the gutter is x the margin is usually set to be 2x.</p>
<p>Flowlines can be used in column grids to help set the subordinate structure or to allow for unusual breaks in text and images. Hanglines and <a href="http://www.alistapart.com/articles/settingtypeontheweb/">baselines</a> can help establish where different elements will be positioned vertically within the columns.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/c4a93_modular-grid.png" alt="Modular grid" width="465" height="500" /></p>
<h2>Modular Grids</h2>
<p>Modular grids are like column girds with the addition of horizontal divisions marked by rows. The columns and rows and the gutters between each create a matrix of cells or modules.</p>
<p>Modular grids are good for complex projects that require more control than a column grid can offer. Image galleries and shopping carts are likely candidates for modular grids.</p>
<p>Modular girds lend themselves to the design of tabular information such as charts, forms, <a href="http://www.vanseodesign.com/css/simple-navigation-bar-with-css-and-xhtml/">navigation</a>, schedules, and of course tables of data. They can help standardize the space in tables and help integrate tables with any surrounding text or images.</p>
<p>Each module in the grid can define a small <a href="http://www.vanseodesign.com/web-design/depth-of-processing/">chunk of information</a> or adjacent modules can be combined to form fields or spatial zones each designated to hold a specific type of information.</p>
<p>Smaller modules allow for a more flexible grid with greater precision, but they can become confusing to work with. Imagine for example setting up a modular grid in which each modules is 1px by 1px. Lot&#8217;s of flexibility, but not much practical use.</p>
<p>Modules can be either horizontal or vertical and the proportion of a module can be determined in a variety of ways.</p>
<ul>
<li>Average width and height of a paragraph</li>
<li>Average image size</li>
<li>Ad unit size</li>
<li>Type proportions like leading and measure</li>
</ul>
<p>Margin proportions will ideally be considered at the same time as module and gutter proportions as each relates to and affects the others.</p>
<p>Large publishing systems that present information across a variety of formats often use modular grids to keep design proportions consistent. This can help a company maintain <a href="http://www.vanseodesign.com/branding/brand-asset/">brand consistency</a>.</p>
<p>Aside from their practical uses, modular grids have developed an aesthetic image.</p>
<p>Between 1950 and 1980 they became associated with an ideal social and political order that has its roots in rationalism. The Bauhaus and Swiss style celebrate objectivity, order, and <a href="http://www.vanseodesign.com/web-design/why-minimalism/">minimalism</a> and turned to modular grids to maintain clarity in form.</p>
<p>This order and clarity can be used to create additional meaning. For example it often conveys a technical or urban feeling and naturally communicates mathematical information.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/c4a93_hierarchy-grid.png" alt="Hierarchical grid" width="465" height="300" /></p>
<h2> Hierarchical Grids</h2>
<p>Hierarchical grids are commonly found on the web. They&#8217;re based more on an intuitive placement of elements, which still conforms to the needs of the information.</p>
<p>Customized proportions are typically used in <a href="http://www.vanseodesign.com/web-design/visual-hierarchy/">hierarchical</a> grids instead of regularly repeated intervals. Column widths tend to vary as do the location of flowlines.</p>
<p>They can be thought of as loose organic grids. Development often begins by spontaneously placing design elements. Later a rational structure to coordinate those elements is determined.</p>
<p><a href="http://www.vanseodesign.com/web-design/counterpart-and-counterpoint-in-typographic-hierarchy/">Hierarchical</a> grids are good when a project requires an odd grid that doesn&#8217;t easily fit one of the other grid types and can be used to unify disparate elements and create a superstructure for organizing them.</p>
<p>If you&#8217;ve designed sites where you carefully align elements to each other without using one of the previous 3 grid types, you&#8217;re probably approaching a hierarchical grid structure in your design.</p>
<p><a href="http://www.amazon.com/Making-Breaking-Grid-Graphic-Workshop/dp/1592531253/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/b7db1_making-and-breaking-the-grid.png" alt="Book cover for 'Making and Breaking the Grid'" width="465" height="558" /></a></p>
<h2>Summary</h2>
<p>The 4 grids above are the main types of grids you&#8217;ll encounter. Each has a different function as far as holding content and choosing the right grid to use should come down to the content for your specific project.</p>
<ul>
<li><strong>Manuscript grids</strong> &mdash; are the simplest and they work well when presenting large continuous blocks of text or images.</li>
<li><strong>Column grids</strong> &mdash; work well when the information being presented is discontinuous and different types of information can be placed in different columns.</li>
<li><strong>Modular grids</strong> &mdash; work best for more complex problems where columns alone don&#8217;t offer enough flexibility.  The introduce horizontal spaces between blocks of content.</li>
<li><strong>Hierarchical girds</strong> &mdash; can be used when none of the above grids will work to solve the problem. They tend to be created organically by first placing design elements on the page and then finding a rational structure for presenting those elements.</li>
</ul>
<p>Hopefully everything above has helped you see that <a href="http://www.thegridsystem.org/">grids</a> come in different varieties and more importantly when you might choose one grid type over another. Each can be the appropriate choice for a website as each allows for variety within the grid.</p>
<p>If you currently work with grids which type of grid to you use most frequently?</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/9f2b1_?ak_action=api_record_view&amp;id=2974&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/MbmiNkyzWNxXpf5zjwcMNJVpRDk/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/9f2b1_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/MbmiNkyzWNxXpf5zjwcMNJVpRDk/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/9f2b1_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e4120_PPFv88zf8JU" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/4-types-of-grids-and-when-each-works-best/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>2 Methods For Developing Hybrid CSS Layouts</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-methods-for-developing-hybrid-css-layouts/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-methods-for-developing-hybrid-css-layouts/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:09:46 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[appearance]]></category>
		<category><![CDATA[attempts]]></category>
		<category><![CDATA[div id]]></category>
		<category><![CDATA[divs]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[layouts]]></category>
		<category><![CDATA[lt]]></category>
		<category><![CDATA[max width]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-methods-for-developing-hybrid-css-layouts/</guid>
		<description><![CDATA[Over the last few weeks we&#8217;ve seen how to develop both fixed width and fluid layouts with html and css. Each has its pros as well as its cons. Hybrid layouts are attempts to gain the pros of one type of layout while minimizing some of the cons. Today I want to present 2 hybrid [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last few weeks we&#8217;ve seen how to develop both <a href="http://www.vanseodesign.com/css/2-column-layout-code/">fixed width</a> and <a href="http://www.vanseodesign.com/css/fluid-layout-code/">fluid layouts</a> with html and css. Each has its pros as well as its cons. Hybrid layouts are attempts to gain the pros of one type of layout while minimizing some of the cons.<br />
<span></span><br />
Today I want to present 2 hybrid layouts. The first is a modified fixed width layout that gives the appearance of being fluid and the second is a modified fluid layout that attempts to rein in the longer lines of text.</p>
<p>These aren&#8217;t the only 2 hybrid layouts, but hopefully they point the way toward techniques you can use to create your own hybrid layouts.</p>
<p>As always if you simply want the code here are the demos</p>
<ul>
<li><a href="http://www.vanseodesign.com/blog/demo/hybrid-css-layout/fixed-content-fluid-background.php">Fixed content and fluid background</a></li>
<li><a href="http://www.vanseodesign.com/blog/demo/hybrid-css-layout/fluid-2-max-width.php"> 2 column fluid layout with max-width</a></li>
<li><a href="http://www.vanseodesign.com/blog/demo/hybrid-css-layout/fluid-3-max-width.php"> 3 column fluid layout with max-width</a></li>
</ul>
<p><a href="http://www.vanseodesign.com/blog/demo/hybrid-css-layout/fixed-content-fluid-background.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/bd657_fixed-content-fluid-background.png" alt="Layout with fixed content and fluid background" width="465" height="210" /></a></p>
<h2>Fixed Width Content, Fluid Background</h2>
<p>The trick to this layout is to use container divs around each row of content within our layout.</p>
<p>This allows us to use the inner div for fixing the width and centering what&#8217;s within while allowing the the outer div to stretch from edge to edge in the browser.</p>
<p>By setting <a href="http://www.vanseodesign.com/css/css-background-property/">backgrounds</a> on the outer div we give the appearance that the layout is fluid, while we maintain control over the content itself. In a sense we create a layout within the layout. This inner layout is fixed, while the outer layout is fluid.</p>
<h3>The HTML</h3>
<p>The html below is similar to the fixed width layouts we&#8217;ve previously discussed.</p>
<pre>
<span>&lt;div id=<span>&quot;header-container&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;header&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Header content here<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;page&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Main content<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;sidebar&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Sidebar<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;footer-container&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Footer: <span>&lt;/p&gt;</span>
	<span>&lt;div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>The difference is that in the fixed-width layouts we wrapped everything with a single container div. Here we&#8217;re wrapping each row of content with a container.</p>
<p>Both header and footer are wrapped with a container div and since the content and sidebar are meant to be displayed next to each other (on a single row in the layout) a single container is used around both.</p>
<p>You might note that while #header and #footer are inner divs, #page is apparently an outer div. We&#8217;ll actually use the body as the outer div for #page instead of adding an additional #page-container div.</p>
<p>These multiple container divs are the key to this layout.</p>
<h3>The CSS</h3>
<p>If you&#8217;ve been following along with this series of posts on <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-1/">css layouts</a> most of this css should also be familiar, though there are some new things which we&#8217;ll talk about below.</p>
<pre>
<span>#header-container, #footer-container {</span><span>background</span><span>:</span><span> #777</span><span>;</span><span>}</span>
<span>#page, #header, #footer {</span>
	<span>width</span><span>:</span><span>960px</span><span>;</span>
	<span>margin</span><span>:</span><span>0 auto</span><span>;</span>
<span>}</span>
<span>#content {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>620px</span><span>;</span>
<span>}</span>
<span>#sidebar {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>340px</span><span>;</span>
<span>}</span>
<span>#footer-container {</span>
	<span>clear</span><span>:</span><span>both</span><span>;</span>
<span>}</span>
</pre>
<p>#content and #sidebar are exactly the same as in the fixed width layouts we&#8217;ve seen before. Here I&#8217;ve cleared #footer-container instead of #footer, but that&#8217;s not really new. The new stuff is the css at the top.</p>
<p>Previously we had a single container div that fixed the width and <a href="http://www.vanseodesign.com/css/centering-with-css/">centered the content</a>. Here we have three, #page, #header, and #footer. Note that we&#8217;re fixing and centering the inner divs. Remember #page is the inner div with body being its container.</p>
<p>By default #header-container and #footer-container have a width that&#8217;s 100% of the body, which is what we want. All we really need to do is set backgrounds on each.</p>
<p>Since our footer and header divs have no background applied to them the background of their containers will show through. Similarly we can set a background on the body. I didn&#8217;t set it here since I want the body and the #page row to be white, which they will be by default.</p>
<p>As long as we don&#8217;t set a backgrounds on the divs holding the content the background of their containers will show through giving the appearance of fluidity.</p>
<p><a href="http://www.vanseodesign.com/css/understanding-css-floats/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/f19f6_2-column-layout.png" alt="2 column layout showing floated elements and normal document flow elements" width="465" height="276" /></a></p>
<h3>Additional Thoughts</h3>
<p>While this layout does create a more fluid feel to a fixed width layout, the downside is the extra html used for all the container divs and that the fluid feel is something of an illusion as most of the design is still fixed.</p>
<p>Still it&#8217;s a nice compromise between fixed and fluid layouts.</p>
<p><strong>Note:</strong> Soh Tanaka has a slightly different method for achieving this same layout. The basic idea is the same, but Soh uses two classes, one fluid and one fixed. To control the layout you apply the appropriate class to the appropriate div.</p>
<p>I&#8217;d encourage you to read his post on <a href="http://www.sohtanaka.com/web-design/achieving-liquid-backgrounds-with-fixed-content/">achieving liquid background with fixed content</a>.</p>
<p>The minor downside to his method is it leaves behind <a href="http://www.vanseodesign.com/web-design/semantic-html/">non-semantic class names</a> in your html, which you may or may not be comfortable doing. </p>
<h2>Rearranging Columns</h2>
<p>Rearranging columns is exactly the same as it was for the fixed width and fluid layouts. Depending on how many columns and how you have things set up in your html it&#8217;s simply a matter of changing float directions for most cases.</p>
<p>For the cases when floats alone won&#8217;t do we need to use a small bit of <a href="http://www.vanseodesign.com/css/css-positioning/">relative and absolute positioning</a> to achieve the desired column order.</p>
<p>Since we&#8217;ve been over it before I won&#8217;t cover the details here and instead point you to the <a href="http://www.vanseodesign.com/css/3-column-layout-code/">3 column fixed width layout</a> post where the details are discussed.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/hybrid-css-layout/fluid-2-max-width.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/354fd_fluid-2-max-width.png" alt="2 column fluid layout with max-width applied" width="465" height="271" /></a></p>
<h2>Fluid Layout With Max Width Content</h2>
<p>The second hybrid layout we&#8217;ll look at starts with a fluid layout and uses max-width values to keep the lines of text from growing too long for comfortable reading.</p>
<h3>The HTML</h3>
<p>The html is exactly the same we used when developing fully fluid layouts.</p>
<pre>
<span>&lt;div id=<span>&quot;header&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Header<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Content<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;sidebar&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Sidebar<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Footer<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>There&#8217;s really nothing new in the html.</p>
<h3>The CSS</h3>
<p>The css should also look familiar. It&#8217;s the same we used when developing fluid layouts with one addition.</p>
<pre>
#content {
	float:left;
	width:67%;
}
#sidebar {
	float:left;
	width:33%;
}
#footer {
	clear:both;
}
#content p, #sidebar p {max-width: 75%}
</pre>
<p>The addition is the last line above where we&#8217;ve set all paragraphs inside the content and the sidebar to have a max-width of 75% of its parent container.</p>
<p>The amount is somewhat arbitrary. I chose 75% since it works well with the demo and the resolution of my laptop. What you use in practice would depend on your particular layout and audience.</p>
<p>You aren&#8217;t limited to setting max-width on paragraphs, however, since we&#8217;re mainly setting it to <a href="http://www.vanseodesign.com/web-design/legible-readable-typography/">prevent lines of text from growing too long</a>, paragraphs are probably the best place.</p>
<p>As headers and footers usually hold different kinds of content I didn&#8217;t set max-width inside either of them here. You might depending on the specifics of your design. The key is setting a max-width wherever content can grow to wide.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/354fd_lafayette-lake-016.jpg" alt="Lake in Lafayette, Colorado" width="465" height="349" /></p>
<h3>Additional Thoughts</h3>
<p>In setting max-widths on our fluid layout we&#8217;re combating one of the prime downsides of fully fluid layouts, that of text lines growing too long. I set the max-width in % here, but on larger monitors this could still lead to overly long line lengths.</p>
<p>For this reason it might make more sense to use px instead of %. Of course using absolute measurements moves us away from fluid design.</p>
<p>Another point to note is that by setting a max-width on the content we create a greater amount of internal <a href="http://www.vanseodesign.com/web-design/whitespace/">whitespace</a> in the design. The larger the browser the more space will be present between blocks of content.</p>
<p>In the demo I gave additional padding to the content and sidebar to help balance out the additional <a href="http://www.vanseodesign.com/web-design/design-space/">space in the design</a>, though it&#8217;s hardly a perfect solution.</p>
<p>Overall using max-width is a nice way to achieve a fluid layout while still retaining a measure of control over the layout of the content.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/hybrid-css-layout/fluid-3-max-width.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/46e5e_fluid-3-max-width.png" alt="3 column fluid layout with max-width applied" width="465" height="250" /></a></p>
<h2>Summary</h2>
<p>Both fixed width and fully fluid <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-2/">css layouts have their pros and cons</a>. Hybrid layouts are an attempt to rein in some of the cons while keeping the pros.</p>
<p>A layout where the content is fixed and the background is fluid attempts to make fixed width layouts appear more fluid than they really are. They maintain control over the layout of the content, while adding fluidity to the background.</p>
<p>A fluid layout with max-width selectively applied attempts to rein in the possibility of longer lines of text while still allowing the overall design to be fluid and resize itself when the browser window is resized.</p>
<p>These aren&#8217;t the only hybrid layout solutions, but they are among the more common. Hopefully the techniques shown here will help you develop your own hybrid layouts when needed.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/5520c_?ak_action=api_record_view&amp;id=2969&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/6GyJNc6fHvZ9HM-wJJl8Ara-a8o/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/5520c_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/6GyJNc6fHvZ9HM-wJJl8Ara-a8o/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/5520c_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/43290_OlpADvpK72A" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-methods-for-developing-hybrid-css-layouts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Anatomy of a Typographic Grid</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/anatomy-of-a-typographic-grid-2/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/anatomy-of-a-typographic-grid-2/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:09:28 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[flowline]]></category>
		<category><![CDATA[focus attention]]></category>
		<category><![CDATA[grids]]></category>
		<category><![CDATA[horizontal bands]]></category>
		<category><![CDATA[horizontal lines]]></category>
		<category><![CDATA[negative space]]></category>
		<category><![CDATA[outer edge]]></category>
		<category><![CDATA[Timothy Samara]]></category>
		<category><![CDATA[type images]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/anatomy-of-a-typographic-grid-2/</guid>
		<description><![CDATA[Recently I&#8217;ve been trying to expand my knowledge and skills working with typographic grids. On the knowledge side I sought out definitions for the different parts of a grid, specifically a modular grid. I couldn&#8217;t find much online and turned to some of the books I have instead. I assume other people have had the [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been trying to expand my knowledge and skills working with <a href="http://www.vanseodesign.com/web-design/legible-readable-typography/">typographic</a> grids. On the knowledge side I sought out definitions for the different parts of a grid, specifically a modular grid.<br />
<span></span><br />
I couldn&#8217;t find much online and turned to some of the books I have instead. I assume other people have had the same trouble searching and thought it might be helpful if this information was more readily available online.</p>
<p>Most of the information in this post comes from Timothy Samara&#8217;s book <a href="http://www.amazon.com/Making-Breaking-Grid-Graphic-Workshop/dp/1592531253/">Making and Breaking the Grid</a>.</p>
<p><a href="http://www.amazon.com/Making-Breaking-Grid-Graphic-Workshop/dp/1592531253/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/d7e17_making-and-breaking-the-grid.png" alt="Book cover for 'Making and Breaking the Grid'" width="465" height="558" /></a></p>
<h2>Anatomy of a Grid</h2>
<p><a href="http://www.thegridsystem.org/">Grids</a> act as guides for the placement of elements in a design. No matter how simple or complex, grids share some common parts, each fulfilling a specific function. Not every one of these parts needs to be present in every grid.</p>
<p>A little further down the page I&#8217;ve added an image showing these common grid parts, which you hopefully find helpful as you read through their descriptions below.</p>
<h3>Format</h3>
<p>The format is the area in which the design sits. In a book or magazine the format is the page. On a website the format is the browser window.</p>
<p>The format defines the live area of a design where type, images, and other media are present.</p>
<h3>Margins</h3>
<p>Margins are the negative space between the edge of the format and the outer edge of the content. </p>
<p>The proportions of margin help to establish the overall tension (or lack of tension) in a composition. The smaller the margin the more tension is created.</p>
<p>Larger margins create more <a href="http://www.vanseodesign.com/web-design/whitespace/">whitespace</a> and help focus attention on the positive space of the design. Larger margins also help the eye find a place to rest and can be a good area to place subordinate information.</p>
<h3>Flowlines</h3>
<p>Flowlines are horizontal lines that break the space into horizontal bands. They can be used to help guide the eye across the page and can be used to impose starting and stopping points for text and images to be aligned.</p>
<p>When elements are aligned to the top of a flowline it&#8217;s called a hangline as the elements appear to hang from the <a href="http://www.vanseodesign.com/web-design/points-dots-lines/">line</a>.</p>
<p>Type is often aligned to a series of flowlines equally spaced down the page called <a href="http://layersmagazine.com/the-art-of-type-baseline-basics.html">baselines</a>. The base of the type sits on the line, hence the term. Aligning type to a baseline can help establish a <a href="http://24ways.org/2006/compose-to-a-vertical-rhythm">vertical rhythm in a design</a>.</p>
<h3>Modules</h3>
<p>Modules are individual units of space that are separated by regular intervals. Modules are the basic building blocks of grids. When repeated they create columns and rows.</p>
<p>Ideally the width of a module will be based on the measure of a line of text. The height would be based on some multiple of the type&#8217;s leading or <a href="http://www.vanseodesign.com/css/thoughts-on-building-a-typographic-stylesheet/">line-height</a>.</p>
<p>The upper left corner of a module is considered to be the <a href="http://www.vanseodesign.com/web-design/active-space/">active</a> corner and the lower right corner, the passive corner.</p>
<h3>Spatial Zones</h3>
<p>Spatial zones are fields of adjacent modules. Each field can be assigned a specific function within the design.</p>
<p>A long horizontal field might be used to place long horizontal images. A long vertical field might be used for long blocks of text. A large rectangular field might be used for video.</p>
<p><a href="http://www.vanseodesign.com/web-design/design-elements/">Design elements</a> will often be placed inside a field or spatial zone as opposed to a single module.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/4bf7f_grid-anatomy.png" alt="Anatomy of a modular grid" width="465" height="600" /></p>
<h3>Columns</h3>
<p>Columns are vertical bands of modules. There can be any number of columns in a grid. More columns leads to more flexibility, but can also make the grid difficult to work with.</p>
<p>Column widths can be equal or they can vary across a grid.</p>
<h3>Rows</h3>
<p>Rows are the horizontal equivalent of columns. Online it&#8217;s harder to plan for rows as the height of the format is often inconsistent and dynamic.</p>
<p>On some pages your design may call for a fixed height, though on most pages your design is allowed grow vertically with the content.</p>
<h3>Gutters</h3>
<p>Gutters are the spaces separating modules either vertically or horizontally. Typically we think of gutters as the space between columns, but they are also the <a href="http://www.vanseodesign.com/web-design/design-space/">space</a> between rows.</p>
<p>The minimum width or height of gutters should be an &#8216;em&#8217; though this should usually be larger to better separate columns from columns and rows from and rows. The height of horizontal gutters should be based on the leading or line-height of the type.</p>
<h3>Folio</h3>
<p>Folios are created when page numbers are placed consistently in the margin, usually above or below the composition.</p>
<h3>Running Header or Footer</h3>
<p>A running header is a guide at the top to indicate your position in a manuscript. You&#8217;d find information like title, chapter title, section title, author, etc located here. A running footer is then this information is placed at the bottom of the format.</p>
<h3>Markers</h3>
<p>Markers are placement indicators for subordinate or consistently appearing information. Markers can be used to denote the location of folios, page numbers, etc.</p>
<p>These last 3 are more commonly found as described in print, but there&#8217;s no reason they couldn&#8217;t also be used on a website.</p>
<p>For example blog posts aren&#8217;t usually given page numbers, but they often display the publication date. When present the date is usually shown at the top of the post, but there&#8217;s no reason it couldn&#8217;t be included in a running header or as a substitute for the page numbers of a folio.</p>
</p>
<h2>Summary</h2>
<p>As more and more web designers are looking to employ girds on the sites they design it makes sense for us to learn the <a href="http://finearts.fontbonne.edu/tech/layout/grid_nom.html">language of grids</a> in order to better understand them and to better talk to each other about them.</p>
<p>When many people talk about grids online there&#8217;s often a focus on columns and to a lesser extent baselines. There are more parts to grids though than columns and baselines.</p>
<p>Hopefully the diagram above along with the definitions in this post will give you a foundation for the common language of grids to help you further understand explore using grids in your own work.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/fd949_?ak_action=api_record_view&amp;id=2958&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/vrta0Zr9JQIminbURfaeoLYj3Qo/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/fd949_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/vrta0Zr9JQIminbURfaeoLYj3Qo/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/fd949_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/f3108_vgUnnes3LKc" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/anatomy-of-a-typographic-grid-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Anatomy of a Typographic Grid</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/anatomy-of-a-typographic-grid/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/anatomy-of-a-typographic-grid/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:08:55 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[flowline]]></category>
		<category><![CDATA[focus attention]]></category>
		<category><![CDATA[grids]]></category>
		<category><![CDATA[horizontal bands]]></category>
		<category><![CDATA[horizontal lines]]></category>
		<category><![CDATA[negative space]]></category>
		<category><![CDATA[outer edge]]></category>
		<category><![CDATA[Timothy Samara]]></category>
		<category><![CDATA[type images]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/anatomy-of-a-typographic-grid/</guid>
		<description><![CDATA[Recently I&#8217;ve been trying to expand my knowledge and skills working with typographic grids. On the knowledge side I sought out definitions for the different parts of a grid, specifically a modular grid. I couldn&#8217;t find much online and turned to some of the books I have instead. I assume other people have had the [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been trying to expand my knowledge and skills working with <a href="http://www.vanseodesign.com/web-design/legible-readable-typography/">typographic</a> grids. On the knowledge side I sought out definitions for the different parts of a grid, specifically a modular grid.<br />
<span></span><br />
I couldn&#8217;t find much online and turned to some of the books I have instead. I assume other people have had the same trouble searching and thought it might be helpful if this information was more readily available online.</p>
<p>Most of the information in this post comes from Timothy Samara&#8217;s book <a href="http://www.amazon.com/Making-Breaking-Grid-Graphic-Workshop/dp/1592531253/">Making and Breaking the Grid</a>.</p>
<p><a href="http://www.amazon.com/Making-Breaking-Grid-Graphic-Workshop/dp/1592531253/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/724fa_making-and-breaking-the-grid.png" alt="Book cover for 'Making and Breaking the Grid'" width="465" height="558" /></a></p>
<h2>Anatomy of a Grid</h2>
<p><a href="http://www.thegridsystem.org/">Grids</a> act as guides for the placement of elements in a design. No matter how simple or complex, grids share some common parts, each fulfilling a specific function. Not every one of these parts needs to be present in every grid.</p>
<p>A little further down the page I&#8217;ve added an image showing these common grid parts, which you hopefully find helpful as you read through their descriptions below.</p>
<h3>Format</h3>
<p>The format is the area in which the design sits. In a book or magazine the format is the page. On a website the format is the browser window.</p>
<p>The format defines the live area of a design where type, images, and other media are present.</p>
<h3>Margins</h3>
<p>Margins are the negative space between the edge of the format and the outer edge of the content. </p>
<p>The proportions of margin help to establish the overall tension (or lack of tension) in a composition. The smaller the margin the more tension is created.</p>
<p>Larger margins create more <a href="http://www.vanseodesign.com/web-design/whitespace/">whitespace</a> and help focus attention on the positive space of the design. Larger margins also help the eye find a place to rest and can be a good area to place subordinate information.</p>
<h3>Flowlines</h3>
<p>Flowlines are horizontal lines that break the space into horizontal bands. They can be used to help guide the eye across the page and can be used to impose starting and stopping points for text and images to be aligned.</p>
<p>When elements are aligned to the top of a flowline it&#8217;s called a hangline as the elements appear to hang from the <a href="http://www.vanseodesign.com/web-design/points-dots-lines/">line</a>.</p>
<p>Type is often aligned to a series of flowlines equally spaced down the page called <a href="http://layersmagazine.com/the-art-of-type-baseline-basics.html">baselines</a>. The base of the type sits on the line, hence the term. Aligning type to a baseline can help establish a <a href="http://24ways.org/2006/compose-to-a-vertical-rhythm">vertical rhythm in a design</a>.</p>
<h3>Modules</h3>
<p>Modules are individual units of space that are separated by regular intervals. Modules are the basic building blocks of grids. When repeated they create columns and rows.</p>
<p>Ideally the width of a module will be based on the measure of a line of text. The height would be based on some multiple of the type&#8217;s leading or <a href="http://www.vanseodesign.com/css/thoughts-on-building-a-typographic-stylesheet/">line-height</a>.</p>
<p>The upper left corner of a module is considered to be the <a href="http://www.vanseodesign.com/web-design/active-space/">active</a> corner and the lower right corner, the passive corner.</p>
<h3>Spatial Zones</h3>
<p>Spatial zones are fields of adjacent modules. Each field can be assigned a specific function within the design.</p>
<p>A long horizontal field might be used to place long horizontal images. A long vertical field might be used for long blocks of text. A large rectangular field might be used for video.</p>
<p><a href="http://www.vanseodesign.com/web-design/design-elements/">Design elements</a> will often be placed inside a field or spatial zone as opposed to a single module.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/ce9fc_grid-anatomy.png" alt="Anatomy of a modular grid" width="465" height="600" /></p>
<h3>Columns</h3>
<p>Columns are vertical bands of modules. There can be any number of columns in a grid. More columns leads to more flexibility, but can also make the grid difficult to work with.</p>
<p>Column widths can be equal or they can vary across a grid.</p>
<h3>Rows</h3>
<p>Rows are the horizontal equivalent of columns. Online it&#8217;s harder to plan for rows as the height of the format is often inconsistent and dynamic.</p>
<p>On some pages your design may call for a fixed height, though on most pages your design is allowed grow vertically with the content.</p>
<h3>Gutters</h3>
<p>Gutters are the spaces separating modules either vertically or horizontally. Typically we think of gutters as the space between columns, but they are also the <a href="http://www.vanseodesign.com/web-design/design-space/">space</a> between rows.</p>
<p>The minimum width or height of gutters should be an &#8216;em&#8217; though this should usually be larger to better separate columns from columns and rows from and rows. The height of horizontal gutters should be based on the leading or line-height of the type.</p>
<h3>Folio</h3>
<p>Folios are created when page numbers are placed consistently in the margin, usually above or below the composition.</p>
<h3>Running Header or Footer</h3>
<p>A running header is a guide at the top to indicate your position in a manuscript. You&#8217;d find information like title, chapter title, section title, author, etc located here. A running footer is then this information is placed at the bottom of the format.</p>
<h3>Markers</h3>
<p>Markers are placement indicators for subordinate or consistently appearing information. Markers can be used to denote the location of folios, page numbers, etc.</p>
<p>These last 3 are more commonly found as described in print, but there&#8217;s no reason they couldn&#8217;t also be used on a website.</p>
<p>For example blog posts aren&#8217;t usually given page numbers, but they often display the publication date. When present the date is usually shown at the top of the post, but there&#8217;s no reason it couldn&#8217;t be included in a running header or as a substitute for the page numbers of a folio.</p>
</p>
<h2>Summary</h2>
<p>As more and more web designers are looking to employ girds on the sites they design it makes sense for us to learn the <a href="http://finearts.fontbonne.edu/tech/layout/grid_nom.html">language of grids</a> in order to better understand them and to better talk to each other about them.</p>
<p>When many people talk about grids online there&#8217;s often a focus on columns and to a lesser extent baselines. There are more parts to grids though than columns and baselines.</p>
<p>Hopefully the diagram above along with the definitions in this post will give you a foundation for the common language of grids to help you further understand explore using grids in your own work.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/4cb2f_?ak_action=api_record_view&amp;id=2958&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/vrta0Zr9JQIminbURfaeoLYj3Qo/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/8dcf8_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/vrta0Zr9JQIminbURfaeoLYj3Qo/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/8dcf8_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/69bdb_vgUnnes3LKc" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/anatomy-of-a-typographic-grid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2 And 3 Column Fluid CSS Layouts</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-and-3-column-fluid-css-layouts-2/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-and-3-column-fluid-css-layouts-2/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:08:31 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[body margin]]></category>
		<category><![CDATA[boilerplate code]]></category>
		<category><![CDATA[construction details]]></category>
		<category><![CDATA[div id]]></category>
		<category><![CDATA[divs]]></category>
		<category><![CDATA[few differences]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[layouts]]></category>
		<category><![CDATA[lt]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-and-3-column-fluid-css-layouts-2/</guid>
		<description><![CDATA[Over the last couple of weeks I&#8217;ve offered some boilerplate code and construction details for 2 column and 3 column fixed width layouts. Let&#8217;s continue today with fluid or liquid layouts. The concepts for creating fluid layouts are mostly the same we used in creating the fixed width layouts with a few key differences. Since [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last couple of weeks I&#8217;ve offered some boilerplate code and construction details for <a href="http://www.vanseodesign.com/css/2-column-layout-code/">2 column</a> and <a href="http://www.vanseodesign.com/css/3-column-layout-code/">3 column fixed width layouts</a>. Let&#8217;s continue today with fluid or liquid layouts.<br />
<span></span><br />
The concepts for creating fluid layouts are mostly the same we used in creating the fixed width layouts with a few key differences.</p>
<p>Since much of what we&#8217;ll do here simply builds on what we&#8217;ve done before I won&#8217;t go into every detail for developing fully fluid layouts. Instead I&#8217;ll direct you to the previous posts and focus here on what&#8217;s new and different.</p>
<ul>
<li><a href="http://www.vanseodesign.com/css/2-column-layout-code/">2 column fixed with layout</a></li>
<li><a href="http://www.vanseodesign.com/css/3-column-layout-code/">3 column fixed width layout</a></li>
</ul>
<p>On the bright side since we&#8217;ll skip some of the previously covered details we&#8217;ll develop both 2 and 3 column fluid layouts in one post. If you&#8217;d prefer to jump directly to the code here&#8217;s a link to the <a href="http://www.vanseodesign.com/blog/demo/fluid-css-layout/fluid-2.php">demos</a>.</p>
<p>Let&#8217;s start with the 2 column liquid layout.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/fluid-css-layout/fluid-2.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/d85b5_content-sidebar.png" alt="2 column fluid layout: content on left, sidebar on right" width="465" height="214" /></a></p>
<h2>The HTML</h2>
<p>If you&#8217;ve been following along with this series the html below should look very familiar. It&#8217;s the same html we used to create a 2 column fixed width layout with one exception.</p>
<pre>
<span>&lt;div id=<span>&quot;header&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Header<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Main content<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;sidebar&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Sidebar<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Footer<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>I&#8217;ve removed the container div that wrapped the header, content, sidebar, and footer divs. If you remember the purpose of the container div was to fix the width and then <a href="http://www.vanseodesign.com/css/centering-with-css/">center everything</a> in the browser.</p>
<p>Since we don&#8217;t need to do either here, we no longer need that container div. Things are already simpler. Nice.</p>
<h2>The CSS</h2>
<p>Again this should be very familiar if you&#8217;ve been following along. There are only a few differences from what we&#8217;ve already seen.</p>
<pre>
<span>body {</span>
	margin:0
<span>}</span>
<span>#content {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>67%</span><span>;</span>
<span>}</span>
<span>#sidebar {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>33%</span><span>;</span>
<span>}</span>
<span>#footer {</span>
	<span>clear</span><span>:</span><span>both</span><span>;</span>
<span>}</span>
</pre>
<p>Naturally since we removed the container div from the html there&#8217;s no container  in the css.</p>
<p>The first new css is to set the margin to 0 on the body. By default the body will have some margin pushing it away from the browser edge. We want our layout to be right up against the edge so we <a href="http://www.vanseodesign.com/css/css-resets-pros-cons/">reset</a> the margin to 0.</p>
<p>The next difference is we&#8217;re specifying widths in % as opposed to px. Since we want our layout to adapt to the size of the browser we have to use a relative measurement instead of a fixed measurement.</p>
<p>If you remember the post on the <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-1/">pros and cons of various css layouts</a> I said that fluid/liquid layouts are relative to the browser. That&#8217;s why we&#8217;re using %. Units like &#8216;em&#8217; are also relative, but they&#8217;re relative to the size of the font, which is internal to the design.</p>
<p>There&#8217;s really nothing else new here. Just as we did with the fixed width layouts, we&#8217;ve floated both columns to the left (we could also float the sidebar to the right) and cleared the footer in both directions.</p>
<p>As with the fixed width layouts we can change the location of columns by changing the direction of the floats.</p>
<pre>
<span>#content {</span>float: right<span>}</span>
<span>#sidebar {</span>float: left<span>}</span>
</pre>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/4e6cd_sidebar-content.png" alt="2 column fluid layout: content on right, sidebar on left" width="465" height="208" /></p>
<h3>Gotchas</h3>
<p>The potential gotcha is in using % as a measurement. Odds are you&#8217;ll want to set some padding or margins on different divs within the layout, and you&#8217;ll likely reach first for px. You might try to do the same with other measurements in your design as well.</p>
<p>However as soon as you start adding absolute units like px you&#8217;re moving away from a fluid layout. The idea with fluid/liquid layouts is to have all measurements be relative to the browser window so they can resize in proportion as the window is resized.</p>
<p>You also need to watch that % add up to 100%. It&#8217;s natural to want 3 columns to have the same width, which would be 33%, but then you&#8217;re missing 1%. Better to have two 33% columns and one 34% column. Not a big deal, but something to remember.</p>
<p>I should also note that like the fixed width layouts what&#8217;s presented here won&#8217;t create columns of equal height. The columns in the demo have equal heights, because I&#8217;ve explicitly set them to be equal. In practice the column height will change based on what&#8217;s inside each.</p>
<p>I&#8217;ll have a post on creating layouts with columns of equal height in a couple of weeks.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/fluid-css-layout/fluid-3.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/4e6cd_primary-content-secondary.png" alt="3 column fluid css layout: primary sidebar, main content, secondary sidebar" width="465" height="208" /></a></p>
<h2>3 Column Liquid Layout</h2>
<p>If you&#8217;ve understood how we set up fixed width layouts and also understood what changed above to make the 2 column fixed layout a 2 column fluid layout, you should already understand how to create a 3 column fluid layout.</p>
<p>I&#8217;ll spare you further explanation and simply present the code.</p>
<h3>The HTML</h3>
<pre>
<span>&lt;div id=<span>&quot;header&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Header<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;primary&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Primary Sidebar<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Main content<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;secondary&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Seconday Sidebar<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Footer<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<h3>The CSS</h3>
<pre>
<span>#primary {</span>
	<span>float</span><span>:</span><span> left:</span><span>;</span>
	<span>width</span><span>:</span><span>25%</span><span>;</span>
<span>}</span>
<span>#content {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>50%</span><span>;</span>
<span>}</span>
<span>#secondary {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>25%</span><span>;</span>
<span>}</span>
<span>#footer {</span>
	<span>clear</span><span>:</span><span>both</span><span>;</span>
<span>}</span>
</pre>
<p>Nothing here should be new. If the above isn&#8217;t making sense please refer back to the fixed width layout posts and the little bit of explanation for the 2 column layout above.</p>
<p>When it comes to moving columns around you might remember that we needed to use <a href="http://www.vanseodesign.com/css/css-positioning/">positioning</a> on one of the 3 columns.</p>
<p>The same applies here, though we have to remember to set the value of left as a % instead of px. We&#8217;ll also set the body to position relative since we&#8217;re no longer using a container div.</p>
<p>Otherwise the explanation for moving columns is exactly the same as it was for the 3 column fixed width layout.</p>
<p>As a reminder for rearranging the columns.</p>
<ul>
<li>When divs are <a href="http://www.vanseodesign.com/css/understanding-css-floats/">floated</a> in the same direction they&#8217;ll display in the same order as they appear in the html. The first div will either be the leftmost or rightmost column depending on whether things are floated left or right.</li>
<li>When two divs are floated in one direction and the third is floated in the opposite direction, the lone div will appear either leftmost or rightmost (depending on the float direction) and the other two divs will be displayed (in their floated direction) in the order they appear in the html.</li>
<li>When neither of the above works you order the columns by floating the two outside columns left and right and then using positioning on the column in the middle and giving it a left value equal to the width of the left column.</li>
</ul>
<p>Feel free to ask questions in the comments below if you need further explanation or even better look for the detailed explanation in the <a href="http://www.vanseodesign.com/css/3-column-layout-code/">3 column fixed width layout</a> post.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/2f457_river.jpg" alt="river.jpg" width="465" height="349" /></p>
<h2>A Word of Caution About Fluid/Liquid Layouts</h2>
<p>When I first talked about the pros and cons of different css layouts I mentioned a few about liquid layouts that I&#8217;d like to bring up again.</p>
<p>With fluid layouts you give up a lot of control over your design. In some respects that&#8217;s how the web should work. We should be giving more control to our audience. However there are times when maintaing control over certain aspects of a design is important.</p>
<p>A major drawback to fluid layouts is that in allowing everything to resize you allow the measure or length of a line of text to resize without any minimum or maximum. That can and does leads to lines of text either too long or too short, which can be uncomfortable to read.</p>
<p>It also means other design elements start reflowing around the text in sometimes unpredictable ways. One way to counter this is by setting some min and max widths.</p>
<p>Unfortunately that kind of goes against the point of having the layout be fully liquid and it can also lead to too much or too little whitespace within your design.</p>
<p>While I think creating designs that are more fluid and adaptable to the different ways our sites and pages will be be viewed is a goal we should strive for, I don&#8217;t care much for <em>fully fluid</em> layouts and can&#8217;t remember the last time I used one.</p>
<p>I also think that our fluid designs should be relative to something internal to the design and not external to the browser and we&#8217;ll get to those designs when we talk about elastic layouts.</p>
<h2>Summary</h2>
<p>Once again here&#8217;s a link to the <a href="http://www.vanseodesign.com/blog/demo/fluid-css-layout/fluid-2.php">demos</a>.</p>
<p>As with the fixed width layouts, the html and css here are rather simple. If you understood how to build the former you shouldn&#8217;t have any problems with the liquid layouts here. The concepts are pretty much the same.</p>
<p>All we&#8217;ve done differently with the fluid layouts is remove the container div (which we used to fixed the width and center the layouts) and to use relative units of measurement (%) instead of absolute units of measurement (px).</p>
<p>It should also be relatively simple for you to add a 4th or 5th column to your fluid layout. Again it&#8217;s the same concepts we&#8217;ve already seen.</p>
<p>As I&#8217;ve done in the previous posts I&#8217;ll encourage you to play around with the code here and see what you can do with it. You need to practice making this code do your bidding before you can truly understand how it works</p>
<p>We&#8217;ll continue this series with hybrid layouts, which we&#8217;ll find are also surprisingly familiar to what we&#8217;ve already seen.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/61954_?ak_action=api_record_view&amp;id=2932&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/hcnM6LiUV0rvUzsUZLHVWjp1_nE/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/61954_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/hcnM6LiUV0rvUzsUZLHVWjp1_nE/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/01ab4_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/23ac4_KBVkt3hYhhk" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-and-3-column-fluid-css-layouts-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>2 And 3 Column Fluid CSS Layouts</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-and-3-column-fluid-css-layouts/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-and-3-column-fluid-css-layouts/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:07:57 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[body margin]]></category>
		<category><![CDATA[boilerplate code]]></category>
		<category><![CDATA[construction details]]></category>
		<category><![CDATA[div id]]></category>
		<category><![CDATA[divs]]></category>
		<category><![CDATA[few differences]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[layouts]]></category>
		<category><![CDATA[lt]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-and-3-column-fluid-css-layouts/</guid>
		<description><![CDATA[Over the last couple of weeks I&#8217;ve offered some boilerplate code and construction details for 2 column and 3 column fixed width layouts. Let&#8217;s continue today with fluid or liquid layouts. The concepts for creating fluid layouts are mostly the same we used in creating the fixed width layouts with a few key differences. Since [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last couple of weeks I&#8217;ve offered some boilerplate code and construction details for <a href="http://www.vanseodesign.com/css/2-column-layout-code/">2 column</a> and <a href="http://www.vanseodesign.com/css/3-column-layout-code/">3 column fixed width layouts</a>. Let&#8217;s continue today with fluid or liquid layouts.<br />
<span></span><br />
The concepts for creating fluid layouts are mostly the same we used in creating the fixed width layouts with a few key differences.</p>
<p>Since much of what we&#8217;ll do here simply builds on what we&#8217;ve done before I won&#8217;t go into every detail for developing fully fluid layouts. Instead I&#8217;ll direct you to the previous posts and focus here on what&#8217;s new and different.</p>
<ul>
<li><a href="http://www.vanseodesign.com/css/2-column-layout-code/">2 column fixed with layout</a></li>
<li><a href="http://www.vanseodesign.com/css/3-column-layout-code/">3 column fixed width layout</a></li>
</ul>
<p>On the bright side since we&#8217;ll skip some of the previously covered details we&#8217;ll develop both 2 and 3 column fluid layouts in one post. If you&#8217;d prefer to jump directly to the code here&#8217;s a link to the <a href="http://www.vanseodesign.com/blog/demo/fluid-css-layout/fluid-2.php">demos</a>.</p>
<p>Let&#8217;s start with the 2 column liquid layout.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/fluid-css-layout/fluid-2.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/85860_content-sidebar.png" alt="2 column fluid layout: content on left, sidebar on right" width="465" height="214" /></a></p>
<h2>The HTML</h2>
<p>If you&#8217;ve been following along with this series the html below should look very familiar. It&#8217;s the same html we used to create a 2 column fixed width layout with one exception.</p>
<pre>
<span>&lt;div id=<span>&quot;header&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Header<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Main content<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;sidebar&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Sidebar<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Footer<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>I&#8217;ve removed the container div that wrapped the header, content, sidebar, and footer divs. If you remember the purpose of the container div was to fix the width and then <a href="http://www.vanseodesign.com/css/centering-with-css/">center everything</a> in the browser.</p>
<p>Since we don&#8217;t need to do either here, we no longer need that container div. Things are already simpler. Nice.</p>
<h2>The CSS</h2>
<p>Again this should be very familiar if you&#8217;ve been following along. There are only a few differences from what we&#8217;ve already seen.</p>
<pre>
<span>body {</span>
	margin:0
<span>}</span>
<span>#content {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>67%</span><span>;</span>
<span>}</span>
<span>#sidebar {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>33%</span><span>;</span>
<span>}</span>
<span>#footer {</span>
	<span>clear</span><span>:</span><span>both</span><span>;</span>
<span>}</span>
</pre>
<p>Naturally since we removed the container div from the html there&#8217;s no container  in the css.</p>
<p>The first new css is to set the margin to 0 on the body. By default the body will have some margin pushing it away from the browser edge. We want our layout to be right up against the edge so we <a href="http://www.vanseodesign.com/css/css-resets-pros-cons/">reset</a> the margin to 0.</p>
<p>The next difference is we&#8217;re specifying widths in % as opposed to px. Since we want our layout to adapt to the size of the browser we have to use a relative measurement instead of a fixed measurement.</p>
<p>If you remember the post on the <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-1/">pros and cons of various css layouts</a> I said that fluid/liquid layouts are relative to the browser. That&#8217;s why we&#8217;re using %. Units like &#8216;em&#8217; are also relative, but they&#8217;re relative to the size of the font, which is internal to the design.</p>
<p>There&#8217;s really nothing else new here. Just as we did with the fixed width layouts, we&#8217;ve floated both columns to the left (we could also float the sidebar to the right) and cleared the footer in both directions.</p>
<p>As with the fixed width layouts we can change the location of columns by changing the direction of the floats.</p>
<pre>
<span>#content {</span>float: right<span>}</span>
<span>#sidebar {</span>float: left<span>}</span>
</pre>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/85860_sidebar-content.png" alt="2 column fluid layout: content on right, sidebar on left" width="465" height="208" /></p>
<h3>Gotchas</h3>
<p>The potential gotcha is in using % as a measurement. Odds are you&#8217;ll want to set some padding or margins on different divs within the layout, and you&#8217;ll likely reach first for px. You might try to do the same with other measurements in your design as well.</p>
<p>However as soon as you start adding absolute units like px you&#8217;re moving away from a fluid layout. The idea with fluid/liquid layouts is to have all measurements be relative to the browser window so they can resize in proportion as the window is resized.</p>
<p>You also need to watch that % add up to 100%. It&#8217;s natural to want 3 columns to have the same width, which would be 33%, but then you&#8217;re missing 1%. Better to have two 33% columns and one 34% column. Not a big deal, but something to remember.</p>
<p>I should also note that like the fixed width layouts what&#8217;s presented here won&#8217;t create columns of equal height. The columns in the demo have equal heights, because I&#8217;ve explicitly set them to be equal. In practice the column height will change based on what&#8217;s inside each.</p>
<p>I&#8217;ll have a post on creating layouts with columns of equal height in a couple of weeks.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/fluid-css-layout/fluid-3.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/d2772_primary-content-secondary.png" alt="3 column fluid css layout: primary sidebar, main content, secondary sidebar" width="465" height="208" /></a></p>
<h2>3 Column Liquid Layout</h2>
<p>If you&#8217;ve understood how we set up fixed width layouts and also understood what changed above to make the 2 column fixed layout a 2 column fluid layout, you should already understand how to create a 3 column fluid layout.</p>
<p>I&#8217;ll spare you further explanation and simply present the code.</p>
<h3>The HTML</h3>
<pre>
<span>&lt;div id=<span>&quot;header&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Header<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;primary&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Primary Sidebar<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Main content<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;secondary&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Seconday Sidebar<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span>
	<span>&lt;p&gt;</span>Footer<span>&lt;/p&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<h3>The CSS</h3>
<pre>
<span>#primary {</span>
	<span>float</span><span>:</span><span> left:</span><span>;</span>
	<span>width</span><span>:</span><span>25%</span><span>;</span>
<span>}</span>
<span>#content {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>50%</span><span>;</span>
<span>}</span>
<span>#secondary {</span>
	<span>float</span><span>:</span><span>left</span><span>;</span>
	<span>width</span><span>:</span><span>25%</span><span>;</span>
<span>}</span>
<span>#footer {</span>
	<span>clear</span><span>:</span><span>both</span><span>;</span>
<span>}</span>
</pre>
<p>Nothing here should be new. If the above isn&#8217;t making sense please refer back to the fixed width layout posts and the little bit of explanation for the 2 column layout above.</p>
<p>When it comes to moving columns around you might remember that we needed to use <a href="http://www.vanseodesign.com/css/css-positioning/">positioning</a> on one of the 3 columns.</p>
<p>The same applies here, though we have to remember to set the value of left as a % instead of px. We&#8217;ll also set the body to position relative since we&#8217;re no longer using a container div.</p>
<p>Otherwise the explanation for moving columns is exactly the same as it was for the 3 column fixed width layout.</p>
<p>As a reminder for rearranging the columns.</p>
<ul>
<li>When divs are <a href="http://www.vanseodesign.com/css/understanding-css-floats/">floated</a> in the same direction they&#8217;ll display in the same order as they appear in the html. The first div will either be the leftmost or rightmost column depending on whether things are floated left or right.</li>
<li>When two divs are floated in one direction and the third is floated in the opposite direction, the lone div will appear either leftmost or rightmost (depending on the float direction) and the other two divs will be displayed (in their floated direction) in the order they appear in the html.</li>
<li>When neither of the above works you order the columns by floating the two outside columns left and right and then using positioning on the column in the middle and giving it a left value equal to the width of the left column.</li>
</ul>
<p>Feel free to ask questions in the comments below if you need further explanation or even better look for the detailed explanation in the <a href="http://www.vanseodesign.com/css/3-column-layout-code/">3 column fixed width layout</a> post.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e6477_river.jpg" alt="river.jpg" width="465" height="349" /></p>
<h2>A Word of Caution About Fluid/Liquid Layouts</h2>
<p>When I first talked about the pros and cons of different css layouts I mentioned a few about liquid layouts that I&#8217;d like to bring up again.</p>
<p>With fluid layouts you give up a lot of control over your design. In some respects that&#8217;s how the web should work. We should be giving more control to our audience. However there are times when maintaing control over certain aspects of a design is important.</p>
<p>A major drawback to fluid layouts is that in allowing everything to resize you allow the measure or length of a line of text to resize without any minimum or maximum. That can and does leads to lines of text either too long or too short, which can be uncomfortable to read.</p>
<p>It also means other design elements start reflowing around the text in sometimes unpredictable ways. One way to counter this is by setting some min and max widths.</p>
<p>Unfortunately that kind of goes against the point of having the layout be fully liquid and it can also lead to too much or too little whitespace within your design.</p>
<p>While I think creating designs that are more fluid and adaptable to the different ways our sites and pages will be be viewed is a goal we should strive for, I don&#8217;t care much for <em>fully fluid</em> layouts and can&#8217;t remember the last time I used one.</p>
<p>I also think that our fluid designs should be relative to something internal to the design and not external to the browser and we&#8217;ll get to those designs when we talk about elastic layouts.</p>
<h2>Summary</h2>
<p>Once again here&#8217;s a link to the <a href="http://www.vanseodesign.com/blog/demo/fluid-css-layout/fluid-2.php">demos</a>.</p>
<p>As with the fixed width layouts, the html and css here are rather simple. If you understood how to build the former you shouldn&#8217;t have any problems with the liquid layouts here. The concepts are pretty much the same.</p>
<p>All we&#8217;ve done differently with the fluid layouts is remove the container div (which we used to fixed the width and center the layouts) and to use relative units of measurement (%) instead of absolute units of measurement (px).</p>
<p>It should also be relatively simple for you to add a 4th or 5th column to your fluid layout. Again it&#8217;s the same concepts we&#8217;ve already seen.</p>
<p>As I&#8217;ve done in the previous posts I&#8217;ll encourage you to play around with the code here and see what you can do with it. You need to practice making this code do your bidding before you can truly understand how it works</p>
<p>We&#8217;ll continue this series with hybrid layouts, which we&#8217;ll find are also surprisingly familiar to what we&#8217;ve already seen.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/36864_?ak_action=api_record_view&amp;id=2932&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/hcnM6LiUV0rvUzsUZLHVWjp1_nE/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/36864_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/hcnM6LiUV0rvUzsUZLHVWjp1_nE/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/36864_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/d7c97_KBVkt3hYhhk" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-and-3-column-fluid-css-layouts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How Important Is Semantic HTML?</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-important-is-semantic-html-2/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-important-is-semantic-html-2/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:07:01 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[aesthetics]]></category>
		<category><![CDATA[blockquote]]></category>
		<category><![CDATA[class names]]></category>
		<category><![CDATA[design principles]]></category>
		<category><![CDATA[div class]]></category>
		<category><![CDATA[divs]]></category>
		<category><![CDATA[paragraph tags]]></category>
		<category><![CDATA[semantics]]></category>
		<category><![CDATA[subheadings]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-important-is-semantic-html-2/</guid>
		<description><![CDATA[We talk all the time about how to better communicate both visually and verbally. We talk about making your aesthetics meaningful and using design principles to help your audience understand your content. What about your code? Can you make the code behind your websites more meaningful? Yes, you can and you do that through the [...]]]></description>
			<content:encoded><![CDATA[<p>We talk all the time about how to better <a href="http://www.vanseodesign.com/web-design/verbal-visual-communication/">communicate both visually and verbally</a>. We talk about <a href="http://www.vanseodesign.com/web-design/meaningful-design-aesthetics/">making your aesthetics meaningful</a> and using design principles to help your audience understand your content. What about your code?<br />
<span></span><br />
Can you make the code behind your websites more meaningful? Yes, you can and you do that through the use of <a href="http://www.webdesignfromscratch.com/html-css/semantic-html/">semantic html</a>.</p>
<p><a href="http://imjustquirky.deviantart.com/art/Semantics-31025653"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/b434f_semantics.jpg" alt="Person at the beach thinking the word semantic" border="0" width="465" height="368" /></a></p>
<h2>What Are Semantics</h2>
<p>Before we get to semantic html we should quickly define <a href="http://en.wikipedia.org/wiki/Semantics">semantics</a>.</p>
<p><strong>semantics</strong> (<em>adj.</em>)</p>
<ul>
<li>of or relating to meaning, especially in language</li>
<li>the meaning or relationship of meanings of a sign or set of signs</li>
</ul>
<p>When people say they want to make something more semantic, they simply want to make that thing <a href="http://www.vanseodesign.com/web-design/propositional-density/">more meaningful</a>.</p>
<p><a href="http://clearice.deviantart.com/art/First-muro-try-177879431"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/8be9b_html5-powered.jpg" alt="html5 powered" width="465" height="237" /></a></p>
<h2>What is Semantic HTML?</h2>
<p><a href="http://semantichtml.org/">Semantic html</a> is using html to reinforce structural meaning. It&#8217;s about using tags, class names, and ids that reinforce the <em>meaning of the content</em> within the tags.</p>
<p>When content is a paragraph of text you mark it up with paragraph tags. When you have a list of items you use list tags. If there&#8217;s some order to the list items you use an ordered list and when the order isn&#8217;t important you use an unordered list.</p>
<p>Each of the tags mentioned is semantic since they describe the content inside the tag.</p>
<p>Semantic html is also about <a href="http://www.thefutureoftheweb.com/blog/writing-semantic-html">using tags in the right way</a>. A blockquote exists to hold a quote inside, not because some bit of text needs to be indented.</p>
<p>How something looks has nothing to do with what it means. It&#8217;s why we separate html and css. The former is for <a href="http://www.vanseodesign.com/web-design/structures-patterns-textures/">structure</a> and meaning, while the latter is for how we present that structure and meaning.</p>
<p>Say you write an article with a main heading and several subheadings. You could easily place each of the headings in a div, add a class or id, and style those divs in any way you&#8217;d like.</p>
<p>We could for example style the following html to visually show our main heading and subheadings:</p>
<pre>
<span>&lt;div class=<span>&quot;big-and-bold&quot;</span>&gt;</span>
<span>&lt;div class=<span>&quot;not-quite-so-big-and-bold&quot;</span>&gt;</span>
<span>&lt;div class=<span>&quot;small-and-thin&quot;</span>&gt;</span>
</pre>
<p>Visually each of those headings could <a href="http://www.vanseodesign.com/web-design/visual-hierarchy/">communicate hierarchy</a> through size and <a href="http://www.vanseodesign.com/web-design/visual-balance/">weight</a>. You could clearly communicate the meaning of each heading to your audience through presentation.</p>
<p>However anyone or anything viewing the html alone wouldn&#8217;t have this meaning communicated to them. Your hierarchy could be inferred by comparing all those divs, but there&#8217;s no real hierarchy there.</p>
<p>&lt;div class=&#8221;big-and-bold&#8221;&gt; tells us absolutely nothing meaningful about the content inside the div. It only suggests what the content will look like.</p>
<p>An &lt;h1&gt; tag on the other hand clearly says this is the most important heading on the page. This is the top of the hierarchy.</p>
<p>Most people, who aren&#8217;t web developers, designers or SEOs, probably aren&#8217;t going to view your article by looking at your html directly. Since you can <a href="http://www.vanseodesign.com/web-design/visual-grammar/">visually communicate meaning</a> to your audience why is semantic html important?</p>
<p><a href="http://www.w3.org/2001/sw/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/a2172_semantic-web.png" alt="W3C Semantic Web Logo" border="0" width="465" height="200" /></a></p>
<h2>Why Semantic HTML is Important</h2>
<p>Semantic html is an additional layer of communication. When you use semantic html you communicate more than when you use non-semantic html. Isn&#8217;t that pretty much the point of what we do? Communicate.</p>
<p>Real people looking only at how your page displays may never get that additional communication, but machines will.</p>
<p>Machines like screen readers and feed readers and search engines. Providing that extra meaning allows those machines to translate the meaning for real people.</p>
<p><a href="http://www.webdesignfromscratch.com/html-css/why-write-semantic-html/">Semantic html is important</a> because it&#8217;s:</p>
<ul>
<li><strong>Clean</strong> &mdash; It&#8217;s easier to read and edit, which saves time and money during maintainence.
<p>Imagine adding the non-semantic class=&#8221;red&#8221; to a span of text. Later you decide that text should be green.  That&#8217;s going to be confusing to someone editing the html at a later date.</p>
<p>Better would be to use something like class=&#8221;price&#8221; (assuming the content is a price on an ecommerce site). You could then change the color from red to green to blue to orange without confusing what that content is.</li>
<li><strong>More accessible</strong> &mdash; It can be better understood by a greater variety of devices. Those devices can then add their own style and presentation based on what&#8217;s best for the device.
<p>A screen reader could raise and lower volume to communicate the hierarchy of your h1-h6 tags for example since you&#8217;ve clearly indicated a hierarchy.</p>
<p>The more meaningful the structure of your content, the better different tools can make use of your content.</li>
<li><strong>Search engine friendly</strong> &mdash; This is still debatable as search engines rank content and not code, but search engines are making greater use of things like <a href="http://www.vanseodesign.com/web-design/microformats-what-how-why/">microformats</a> to understand content.
<p>Google can read the <a href="http://microformats.org/wiki/hreview">hreview microformat</a> and can use the data to create richer snippets below search results.</p>
<p>They could potentially rank pages they know to be reviews higher when someone is specifically searching for a review.</li>
</ul>
<p>I&#8217;m sure you&#8217;ve seen arguments for why it&#8217;s <a href="http://www.vanseodesign.com/css/css-divs-vs-tables/">better to use css than tables to layout a website</a>. One reason is semantics.</p>
<p>An html table is meant to house data, the kind of stuff you&#8217;d place in a spreadsheet. Using table for layout confuses the communication.</p>
<p>Just as you wouldn&#8217;t create a slide for a presentation by placing images and text in spreadsheet cells you shouldn&#8217;t do the same inside html tables.</p>
<p>You might have a slide that features data in a spreadsheet, just as you might create a web page that features data in a table, but you wouldn&#8217;t try to design every slide using a spreadsheet.</p>
<p><a href="http://www.flickr.com/photos/lord-jim/4320836445/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/a2172_blah-blah-blah.jpg" alt="The word 'blah' on 3 canvases and hung on a white wall" width="465" height="310" /></a></p>
<h2>Is it OK to Use Non-Semantic HTML?</h2>
<p>Many would answer no. Some might think I&#8217;m crazy for even asking the question.</p>
<p>Since semantic html is communicating more than non-semantic html it would seem to make sense to always use semantic html. But are there times when non-semantic html might actually make development easier?</p>
<p>Consider <a href="http://www.vanseodesign.com/css/css-frameworks-pros-cons/">css grid frameworks</a>, which typically include class names like grid_1 or container_12. They aren&#8217;t semantic.</p>
<p>A  class name like container_12 indicates a 12 column grid, but what happens later when you want to change the site to a 16 column grid or a 4 column grid.</p>
<p>Classes like grid_1 don&#8217;t exactly help screen readers or search engines understand content either. They aren&#8217;t describing the content. They&#8217;re describing the presentation of content.</p>
<p>At the same time those class names can be very meaningful to a designer who works with grids. At a glance the underlying grid structure of the design is readily apparent.</p>
<p>Grid frameworks generally help speed development time as well so there are benefits to using them. Yet some would say <a href="http://donatstudios.com/Grid_CSS_Versus_The_Web">we should never use them</a> because of the lack of semantics</p>
<p>Where do we draw the line?</p>
<p>Good class names should never need to change, however the presentation of a website sometimes does change. When structure and presentation are mixed as in class=&#8221;red&#8221; or class=&#8221;grid_5&#8243; we have to:</p>
<ul>
<li>Change structure to change presentation</li>
<li>Confuse style and structure such as styling class=&#8221;red&#8221; to be green</li>
<li>Leave behind classes in html that are no longer styled at all</li>
<p></uL></p>
<p>One solution is to use frameworks like <a href="http://compass-style.org/">Compass</a>, <a href="https://github.com/anthonyshort/Scaffold/wiki">Scaffold</a> and <a href="http://sass-lang.com/">Sass</a> to convert our non-semantic code to semantic code.</p>
<p>Doing so we gain the benefits of working with <a href="http://blogs.sitepoint.com/css-frameworks-semantic-class-names/">grid based class names</a> during development and then convert our code to semantic markup for the live site.</p>
<p>Like most <a href="http://www.vanseodesign.com/web-design/decision-making-styles/">design decisions</a> there&#8217;s always a tradeoff. We have to weigh the good and bad and decide which is best to use for a given project.</p>
<p>I&#8217;m still mixed on how semantic my code needs to be. All things being equal we should always choose the semantic option, but all things are seldom equal.</p>
<p>At times I think the benefits of some non-semantic html as in the grid based class names are worth the loss of semantic meaning. I do think we should strive to write semantic code. I don&#8217;t think non-semantic code is as evil as some would suggest.</p>
<p>Ask me in 6 months though and I may easily have changed my mind. If you have arguments for or against the use of semantic code please share.</p>
<p><a href="http://zerostumbleine33.deviantart.com/art/It-s-All-Semantics-15059608"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e3f61_semantics-2.jpg" alt="It's all semantics" width="465" height="310" /></a></p>
<h2>Summary</h2>
<p>Communication is the central task of web designers. Most of the time we think of communication in terms of the words we use and the visuals we create, but it also extends to the code we write.</p>
<p>Semantics are about meaning. <a href="http://elliotjaystocks.com/blog/pedantic-semantics/">Writing semantic code</a> means writing more meaningful code. We should strive to write html that describes content and not the presentation of that content.</p>
<p>class=&#8221;red&#8221; is always a bad idea, but what about class=&#8221;grid_4&#8243;? Is all non-semantic markup bad or is it ok at times and under certain circumstances?</p>
<p>My best answer is we should do our best to write semantic code, but we shouldn&#8217;t obsess over it. Similar to how we should do our best to <a href="http://www.vanseodesign.com/web-design/validating-code/">write valid code</a> though not worry about an invalid line here or there? Again I haven&#8217;t entirely made up mind about this.</p>
<p>Where do you stand. Should all code be semantic? Is it ok to be non-semantic at times? What do you consider best practice?</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/9993a_?ak_action=api_record_view&amp;id=2926&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/uYm6MDDI7mJoH30ZHig9HmubIus/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/f0a4f_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/uYm6MDDI7mJoH30ZHig9HmubIus/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/f0a4f_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/31da8_BRDtYdGMRUc" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-important-is-semantic-html-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How Important Is Semantic HTML?</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-important-is-semantic-html/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-important-is-semantic-html/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:06:36 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[aesthetics]]></category>
		<category><![CDATA[blockquote]]></category>
		<category><![CDATA[class names]]></category>
		<category><![CDATA[design principles]]></category>
		<category><![CDATA[div class]]></category>
		<category><![CDATA[divs]]></category>
		<category><![CDATA[paragraph tags]]></category>
		<category><![CDATA[semantics]]></category>
		<category><![CDATA[subheadings]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-important-is-semantic-html/</guid>
		<description><![CDATA[We talk all the time about how to better communicate both visually and verbally. We talk about making your aesthetics meaningful and using design principles to help your audience understand your content. What about your code? Can you make the code behind your websites more meaningful? Yes, you can and you do that through the [...]]]></description>
			<content:encoded><![CDATA[<p>We talk all the time about how to better <a href="http://www.vanseodesign.com/web-design/verbal-visual-communication/">communicate both visually and verbally</a>. We talk about <a href="http://www.vanseodesign.com/web-design/meaningful-design-aesthetics/">making your aesthetics meaningful</a> and using design principles to help your audience understand your content. What about your code?<br />
<span></span><br />
Can you make the code behind your websites more meaningful? Yes, you can and you do that through the use of <a href="http://www.webdesignfromscratch.com/html-css/semantic-html/">semantic html</a>.</p>
<p><a href="http://imjustquirky.deviantart.com/art/Semantics-31025653"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/300e7_semantics.jpg" alt="Person at the beach thinking the word semantic" border="0" width="465" height="368" /></a></p>
<h2>What Are Semantics</h2>
<p>Before we get to semantic html we should quickly define <a href="http://en.wikipedia.org/wiki/Semantics">semantics</a>.</p>
<p><strong>semantics</strong> (<em>adj.</em>)</p>
<ul>
<li>of or relating to meaning, especially in language</li>
<li>the meaning or relationship of meanings of a sign or set of signs</li>
</ul>
<p>When people say they want to make something more semantic, they simply want to make that thing <a href="http://www.vanseodesign.com/web-design/propositional-density/">more meaningful</a>.</p>
<p><a href="http://clearice.deviantart.com/art/First-muro-try-177879431"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/300e7_html5-powered.jpg" alt="html5 powered" width="465" height="237" /></a></p>
<h2>What is Semantic HTML?</h2>
<p><a href="http://semantichtml.org/">Semantic html</a> is using html to reinforce structural meaning. It&#8217;s about using tags, class names, and ids that reinforce the <em>meaning of the content</em> within the tags.</p>
<p>When content is a paragraph of text you mark it up with paragraph tags. When you have a list of items you use list tags. If there&#8217;s some order to the list items you use an ordered list and when the order isn&#8217;t important you use an unordered list.</p>
<p>Each of the tags mentioned is semantic since they describe the content inside the tag.</p>
<p>Semantic html is also about <a href="http://www.thefutureoftheweb.com/blog/writing-semantic-html">using tags in the right way</a>. A blockquote exists to hold a quote inside, not because some bit of text needs to be indented.</p>
<p>How something looks has nothing to do with what it means. It&#8217;s why we separate html and css. The former is for <a href="http://www.vanseodesign.com/web-design/structures-patterns-textures/">structure</a> and meaning, while the latter is for how we present that structure and meaning.</p>
<p>Say you write an article with a main heading and several subheadings. You could easily place each of the headings in a div, add a class or id, and style those divs in any way you&#8217;d like.</p>
<p>We could for example style the following html to visually show our main heading and subheadings:</p>
<pre>
<span>&lt;div class=<span>&quot;big-and-bold&quot;</span>&gt;</span>
<span>&lt;div class=<span>&quot;not-quite-so-big-and-bold&quot;</span>&gt;</span>
<span>&lt;div class=<span>&quot;small-and-thin&quot;</span>&gt;</span>
</pre>
<p>Visually each of those headings could <a href="http://www.vanseodesign.com/web-design/visual-hierarchy/">communicate hierarchy</a> through size and <a href="http://www.vanseodesign.com/web-design/visual-balance/">weight</a>. You could clearly communicate the meaning of each heading to your audience through presentation.</p>
<p>However anyone or anything viewing the html alone wouldn&#8217;t have this meaning communicated to them. Your hierarchy could be inferred by comparing all those divs, but there&#8217;s no real hierarchy there.</p>
<p>&lt;div class=&#8221;big-and-bold&#8221;&gt; tells us absolutely nothing meaningful about the content inside the div. It only suggests what the content will look like.</p>
<p>An &lt;h1&gt; tag on the other hand clearly says this is the most important heading on the page. This is the top of the hierarchy.</p>
<p>Most people, who aren&#8217;t web developers, designers or SEOs, probably aren&#8217;t going to view your article by looking at your html directly. Since you can <a href="http://www.vanseodesign.com/web-design/visual-grammar/">visually communicate meaning</a> to your audience why is semantic html important?</p>
<p><a href="http://www.w3.org/2001/sw/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/48ad0_semantic-web.png" alt="W3C Semantic Web Logo" border="0" width="465" height="200" /></a></p>
<h2>Why Semantic HTML is Important</h2>
<p>Semantic html is an additional layer of communication. When you use semantic html you communicate more than when you use non-semantic html. Isn&#8217;t that pretty much the point of what we do? Communicate.</p>
<p>Real people looking only at how your page displays may never get that additional communication, but machines will.</p>
<p>Machines like screen readers and feed readers and search engines. Providing that extra meaning allows those machines to translate the meaning for real people.</p>
<p><a href="http://www.webdesignfromscratch.com/html-css/why-write-semantic-html/">Semantic html is important</a> because it&#8217;s:</p>
<ul>
<li><strong>Clean</strong> &mdash; It&#8217;s easier to read and edit, which saves time and money during maintainence.
<p>Imagine adding the non-semantic class=&#8221;red&#8221; to a span of text. Later you decide that text should be green.  That&#8217;s going to be confusing to someone editing the html at a later date.</p>
<p>Better would be to use something like class=&#8221;price&#8221; (assuming the content is a price on an ecommerce site). You could then change the color from red to green to blue to orange without confusing what that content is.</li>
<li><strong>More accessible</strong> &mdash; It can be better understood by a greater variety of devices. Those devices can then add their own style and presentation based on what&#8217;s best for the device.
<p>A screen reader could raise and lower volume to communicate the hierarchy of your h1-h6 tags for example since you&#8217;ve clearly indicated a hierarchy.</p>
<p>The more meaningful the structure of your content, the better different tools can make use of your content.</li>
<li><strong>Search engine friendly</strong> &mdash; This is still debatable as search engines rank content and not code, but search engines are making greater use of things like <a href="http://www.vanseodesign.com/web-design/microformats-what-how-why/">microformats</a> to understand content.
<p>Google can read the <a href="http://microformats.org/wiki/hreview">hreview microformat</a> and can use the data to create richer snippets below search results.</p>
<p>They could potentially rank pages they know to be reviews higher when someone is specifically searching for a review.</li>
</ul>
<p>I&#8217;m sure you&#8217;ve seen arguments for why it&#8217;s <a href="http://www.vanseodesign.com/css/css-divs-vs-tables/">better to use css than tables to layout a website</a>. One reason is semantics.</p>
<p>An html table is meant to house data, the kind of stuff you&#8217;d place in a spreadsheet. Using table for layout confuses the communication.</p>
<p>Just as you wouldn&#8217;t create a slide for a presentation by placing images and text in spreadsheet cells you shouldn&#8217;t do the same inside html tables.</p>
<p>You might have a slide that features data in a spreadsheet, just as you might create a web page that features data in a table, but you wouldn&#8217;t try to design every slide using a spreadsheet.</p>
<p><a href="http://www.flickr.com/photos/lord-jim/4320836445/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/2ff85_blah-blah-blah.jpg" alt="The word 'blah' on 3 canvases and hung on a white wall" width="465" height="310" /></a></p>
<h2>Is it OK to Use Non-Semantic HTML?</h2>
<p>Many would answer no. Some might think I&#8217;m crazy for even asking the question.</p>
<p>Since semantic html is communicating more than non-semantic html it would seem to make sense to always use semantic html. But are there times when non-semantic html might actually make development easier?</p>
<p>Consider <a href="http://www.vanseodesign.com/css/css-frameworks-pros-cons/">css grid frameworks</a>, which typically include class names like grid_1 or container_12. They aren&#8217;t semantic.</p>
<p>A  class name like container_12 indicates a 12 column grid, but what happens later when you want to change the site to a 16 column grid or a 4 column grid.</p>
<p>Classes like grid_1 don&#8217;t exactly help screen readers or search engines understand content either. They aren&#8217;t describing the content. They&#8217;re describing the presentation of content.</p>
<p>At the same time those class names can be very meaningful to a designer who works with grids. At a glance the underlying grid structure of the design is readily apparent.</p>
<p>Grid frameworks generally help speed development time as well so there are benefits to using them. Yet some would say <a href="http://donatstudios.com/Grid_CSS_Versus_The_Web">we should never use them</a> because of the lack of semantics</p>
<p>Where do we draw the line?</p>
<p>Good class names should never need to change, however the presentation of a website sometimes does change. When structure and presentation are mixed as in class=&#8221;red&#8221; or class=&#8221;grid_5&#8243; we have to:</p>
<ul>
<li>Change structure to change presentation</li>
<li>Confuse style and structure such as styling class=&#8221;red&#8221; to be green</li>
<li>Leave behind classes in html that are no longer styled at all</li>
<p></uL></p>
<p>One solution is to use frameworks like <a href="http://compass-style.org/">Compass</a>, <a href="https://github.com/anthonyshort/Scaffold/wiki">Scaffold</a> and <a href="http://sass-lang.com/">Sass</a> to convert our non-semantic code to semantic code.</p>
<p>Doing so we gain the benefits of working with <a href="http://blogs.sitepoint.com/css-frameworks-semantic-class-names/">grid based class names</a> during development and then convert our code to semantic markup for the live site.</p>
<p>Like most <a href="http://www.vanseodesign.com/web-design/decision-making-styles/">design decisions</a> there&#8217;s always a tradeoff. We have to weigh the good and bad and decide which is best to use for a given project.</p>
<p>I&#8217;m still mixed on how semantic my code needs to be. All things being equal we should always choose the semantic option, but all things are seldom equal.</p>
<p>At times I think the benefits of some non-semantic html as in the grid based class names are worth the loss of semantic meaning. I do think we should strive to write semantic code. I don&#8217;t think non-semantic code is as evil as some would suggest.</p>
<p>Ask me in 6 months though and I may easily have changed my mind. If you have arguments for or against the use of semantic code please share.</p>
<p><a href="http://zerostumbleine33.deviantart.com/art/It-s-All-Semantics-15059608"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/ca888_semantics-2.jpg" alt="It's all semantics" width="465" height="310" /></a></p>
<h2>Summary</h2>
<p>Communication is the central task of web designers. Most of the time we think of communication in terms of the words we use and the visuals we create, but it also extends to the code we write.</p>
<p>Semantics are about meaning. <a href="http://elliotjaystocks.com/blog/pedantic-semantics/">Writing semantic code</a> means writing more meaningful code. We should strive to write html that describes content and not the presentation of that content.</p>
<p>class=&#8221;red&#8221; is always a bad idea, but what about class=&#8221;grid_4&#8243;? Is all non-semantic markup bad or is it ok at times and under certain circumstances?</p>
<p>My best answer is we should do our best to write semantic code, but we shouldn&#8217;t obsess over it. Similar to how we should do our best to <a href="http://www.vanseodesign.com/web-design/validating-code/">write valid code</a> though not worry about an invalid line here or there? Again I haven&#8217;t entirely made up mind about this.</p>
<p>Where do you stand. Should all code be semantic? Is it ok to be non-semantic at times? What do you consider best practice?</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/4ad94_?ak_action=api_record_view&amp;id=2926&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/uYm6MDDI7mJoH30ZHig9HmubIus/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/4ad94_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/uYm6MDDI7mJoH30ZHig9HmubIus/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/b082c_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/51549_BRDtYdGMRUc" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-important-is-semantic-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3 Column CSS Layout: Fixed Width And Centered</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/3-column-css-layout-fixed-width-and-centered-2/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/3-column-css-layout-fixed-width-and-centered-2/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:05:58 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[column layout]]></category>
		<category><![CDATA[css layout]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[detailed explanation]]></category>
		<category><![CDATA[div id]]></category>
		<category><![CDATA[divs]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[lt]]></category>
		<category><![CDATA[Sidebar]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/3-column-css-layout-fixed-width-and-centered-2/</guid>
		<description><![CDATA[Last week I shared the code I use to start a 2 column fixed width layout. Today I want to expand that code and share how I&#8217;d build a 3 column layout that&#8217;s also of fixed width and centered on the page. Many of the concepts will be the same as in the previous post [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I shared the code I use to start a <a href="http://www.vanseodesign.com/css/2-column-layout-code/">2 column fixed width layout</a>. Today I want to expand that code and share how I&#8217;d build a 3 column layout that&#8217;s also of fixed width and centered on the page.<br />
<span></span><br />
Many of the concepts will be the same as in the previous post so I&#8217;ll skip some of the details here. If you need more explanation than this post has I&#8217;ll refer you back to the <a href="http://www.vanseodesign.com/css/2-column-layout-code/">2 column layout post</a>.</p>
<p>There will be some new concepts when we try to move the columns around for which I&#8217;ll offer a more detailed explanation.</p>
<p>For those who prefer to skip the explanation here&#8217;s a <a href="http://www.vanseodesign.com/blog/demo/3-column-css/index.php">demo</a> of what we&#8217;ll be building and you can view the source for the code.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/3-column-css/index.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/b99ab_primary-main-secondary.png" alt="3 column layout: primary sidebar main content secondary sidebar" width="465" height="250" /></a></p>
<h2>The HTML</h2>
<p>As with the 2 column layout, the html for a 3 column layout is rather simple. In fact the only real difference is one additional div for our third column.</p>
<pre>
<span>&lt;div id=<span>&quot;container&quot;</span>&gt;</span>
        <span>&lt;div id=<span>&quot;header&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Header<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;primary&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Primary Sidebar<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Main content<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;secondary&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Secondary Sidebar<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Footer<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>Instead of using sidebar-1 and sidebar-2 I&#8217;m calling the sidebars primary and secondary. You&#8217;re free to call them whatever works best for you.</p>
<p>One point to make about the html is the order of the divs. If you remember last week we moved the columns simply by changing the direction of <a href="http://www.vanseodesign.com/css/understanding-css-floats/">floated divs</a>. We&#8217;ll do the same here, but that alone won&#8217;t allow us to reorder the columns in all possible ways.</p>
<p>I&#8217;ll get to the details in a bit, but with 3 columns there are 6 potential ways to order those columns. We can achieve 4 of those 6 ways just by changing the direction of the floats. For the last 2 we&#8217;ll need to use some relative and absolute positioning.</p>
<p><a href="http://www.panic.com/coda/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/79db1_css-coda-3.jpg" alt="CSS tab inside Coda editor by Panic" width="465" height="219" /></a></p>
<h2>The CSS</h2>
<p>Once again the css is rather simple and should be familiar if you read the previous post. And just as with the <a href="http://www.vanseodesign.com/blog/demo/2-col-css.html">2 column demo</a> I&#8217;ve stripped away css that&#8217;s only there to make the demo more presentable. Here&#8217;s the css we need for this layout</p>
<pre>
#container {
	width: 960px;
	margin: 0 auto;
}
#primary {
	float: left;
	width: 240px;
}
#content {
	float: left;
	width: 480px;
}
#secondary {
	float: left;
	width: 240px;
}
#footer {
	clear: both;
}
</pre>
<p>There really isn&#8217;t anything new here when compared to the 2 column layout. We&#8217;ve used our container div to <a href="http://www.vanseodesign.com/css/centering-with-css/">center everything on the page</a> and floated our columns to the left. Lastly we cleared the footer.</p>
<p>If you need explanation about what&#8217;s going on please see that explanation in the 2 column layout post.</p>
<p>While I&#8217;ve floated all 3 divs to the left, you could also float the rightmost column to the right. In this case that would our #secondary div.</p>
<p>I typically float all columns in the same direction, though I think it&#8217;s more common to float the rightmost div to the right. Like I mentioned last week, I&#8217;m unaware of either being better or worse.</p>
<p>Floating everything in one direction made it easier for me to understand when I first started working with floats and now it&#8217;s become habit.</p>
<p><a href="http://www.flickr.com/photos/1967chevrolet/4272868759/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/052cb_columns.jpg" alt="Columns - Temple of a Thousand Warriors" width="465" height="294" /></a></p>
<h2>Rearranging the Columns</h2>
<p>The first way to rearrange columns is to reorder their divs in the html. When first developing a site you&#8217;ll likely structure your html how you want the columns to display on the page.</p>
<p>There will be times though when you want to move the columns around after the site is live or because you want to the columns to have different orders on different pages without having to change the html.</p>
<p>Fortunately we can rearrange the columns through css alone and doing so will hopefully make for a good learning experience.</p>
<p>I mentioned above there were 6 possible ways we could order the 3 columns.</p>
<ul>
<li>primary, content, secondary</li>
<li>secondary, content, primary </li>
<li> content, secondary, primary </li>
<li>primary, secondary, content</li>
<li>secondary, primary, content</li>
<li>content, primary, secondary </li>
</ul>
<p>Not the most logical order to list them I admit, but there&#8217;s a reason why I&#8217;ve listed them this way.</p>
<p>The first order above (primary, content, secondary) we&#8217;ve already coded. The next 3 on the list we can get to by changing float directions. For the last two we&#8217;ll need to mix in some positioning.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/3-column-css/secondary-main-primary.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/052cb_secondary-content-primary.png" alt="3 column layout: secondary sidebar, main content, primary sidebar" width="465" height="155" /></a></p>
<h3>Secondary, Content, Primary</h3>
<p>When we float all 3 columns in the same direction they will always display in the same order they appear in the html. That will be true regardless of whether we float all 3 to the left (as we&#8217;ve done above) or to the right.</p>
<p>If we float all 3 divs to the right we&#8217;ll get the reverse order of how they appear in the html, which is all we need to achieve this column order.</p>
<p>The easiest way then to have all 3 columns display in the same sequential order as they appear in the html is to float all 3 in the same direction either left or right.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/3-column-css/primary-secondary-main.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/a22c4_primary-secondary-content.png" alt="3 column layout:  primary sidebar, secondary sidebar, main content" width="465" height="154" /></a></p>
<h3>Primary, Secondary, Content</h3>
<p>To get the next two layouts on the list we&#8217;ll change the direction of a single float so it&#8217;s in the opposite direction of the other two.</p>
<p>When we float any 2 of the 3 columns in one direction and float the third in the opposite direction, the one floated opposite will sit at the outermost edge in the direction it&#8217;s floated.</p>
<p>If we want to move our main content div to the right we&#8217;ll float our main content to the right and keep primary and secondary floated to the left.</p>
<p>As you might expect the two sidebars display to the left of the content in the order they appear in the html. In our case the primary column will be leftmost and the secondary column will appear to it&#8217;s right.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/3-column-css/main-secondary-primary.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/a22c4_content-secondary-primary.png" alt="3 column layout: main content, secondary sidebar, primary sidebar" width="465" height="155" /></a></p>
<h3>Content, Secondary, Primary</h3>
<p>Similarly if we want our primary column to be the rightmost column we float it to the right and float the other 2 columns to the left.</p>
<p>Again if 2 columns are floated in one direction and the third is floated opposite the opposite will display at the far end of the same direction it&#8217;s floated and the other 2 columns will display in the order seen in the html.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/3-column-css/secondary-primary-main.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/39021_secondary-primary-content.png" alt="3 column layout:  secondary sidebar, primary sidebar, main content" width="465" height="155" /></a></p>
<h3>Secondary, Primary, Content</h3>
<p>Unfortunately we need to do more than change float directions to get the last 2 orders.</p>
<p>Let&#8217;s think for a moment about how we might go about setting up this column order. Since we want the main content column to be rightmost let&#8217;s start by floating it to the right.</p>
<p>One of our 3 columns is now where want. We&#8217;re left needing to swap the order of the primary and secondary columns.</p>
<p>Your first instinct might be to float the primary column to the right, but that will place it to the right of the main content. What we need to do is add some positioning. Fortunately we don&#8217;t need to add a lot.</p>
<p>I won&#8217;t be able to offer a full explanation for how positioning works here so I&#8217;ll direct you to my post on <a href="http://www.vanseodesign.com/css/css-positioning/">understanding css positioning</a> if you need a more detailed explanation for why the following works.</p>
<p>First we&#8217;ll add relative positioning to our container div</p>
<pre>
#container {position: relative}
</pre>
<p>This won&#8217;t affect our #container div at all, but it will allow us to position columns relative to the container div. If we skip this we&#8217;ll be positioning columns relative to the body of our html.</p>
<p>Next we&#8217;ll remove the float and add absolute positioning to the primary sidebar.</p>
<pre>
#primary {position: absolute}
</pre>
<p>If we stop here something strange happens. Our primary column hasn&#8217;t moved, but our secondary column seems to have vanished.</p>
<p><a href="http://www.vanseodesign.com/css/css-resets-pros-cons/">By default</a> our primary column will have a value of 0 for it&#8217;s left property, which keeps it right where it was. However by changing from a float to position the primary column no longer holds the secondary column to its right.</p>
<p>Our secondary column is now hiding behind our primary column. Understanding why is a matter of <a href="http://www.vanseodesign.com/css/css-stack-z-index/">understanding the css stack and the z-index property</a>.</p>
<p>We need to move the primary column further to the right, which will also reveal the secondary column. We do so by increasing the value of left to be equal to the width of the secondary column</p>
<pre>
#primary {left: 240px}
</pre>
<p>And now all 3 columns are displaying exactly where we want.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/3-column-css/main-primary-secondary.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/39021_content-primary-secondary.png" alt="3 column layout: main content, primary sidebar, secondary sidebar" width="465" height="154" /></a></p>
<h3>Content, Primary, Secondary</h3>
<p>To get our last layout we need to reverse the order of the columns we just set up above. </p>
<p>Here we want the content on the left and the secondary column on the right so let&#8217;s switch the direction of the floats for both.</p>
<p>Not bad. We&#8217;re almost there. In fact the only problem at this point is the primary div isn&#8217;t far enough to the right. We just need to alter it&#8217;s left value to match the width of the content.</p>
<pre>
#primary {left: 480px}
</pre>
<p>and we&#8217;re done.</p>
<p>We used the same basic concept in both of the above orders.</p>
<p>The column we wanted to be furthest left we float left. The column we wanted to be furthest to the right we float right. For the column we want in between we used absolute positioning and gave it a left value equal to the width of the leftmost column.</p>
<p>We also made sure to add relative positioning to the container div.</p>
<p><strong>Note:</strong> Like our 2 column layout this won&#8217;t create columns of equal height as it appears in the <a href="http://www.vanseodesign.com/blog/demo/3-column-css/index.php">demo</a>. The columns have equal height because I set their heights to the same value. Creating equal height columns is something for another time, though I promise to write a post about how before too long if you&#8217;re interested.</p>
<p><a href="http://www.flickr.com/photos/riebart/4466482623/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/23d78_code.jpg" alt="A section of code from Kate code editor" width="465" height="309" /></a></p>
<h2>Summary</h2>
<p>Setting up the css for a 3 column layout isn&#8217;t really any harder than setting up the css for a 2 column layout. The same principle of floating all the columns in the same direction applies.</p>
<p>If you&#8217;ve understood this and the last post you should now be able to create 4 and 5 column layouts as well.</p>
<p>What&#8217;s a little trickier is rearranging the columns. We changed the float direction of columns to achieve several column layouts and used positioning to get to a couple more.</p>
<p>If you&#8217;ve been following along you now have several different methods for setting up multi-column <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-1/">css layouts</a> regardless of how many columns and regardless of the order those columns appear in your html.</p>
<p>I&#8217;d encourage you to play around.  Change floats and position different columns. Try adding a 4th column and see how you can reorganize all of them.</p>
<p>In this and the last post I&#8217;ve given you some instructions for moving blocks around on a web page. Spend some time moving those blocks around. The more you experiment on your own, the greater you&#8217;ll understand how and why this all works.</p>
<p>Next week I&#8217;ll continue with fully fluid layouts. The principles will be very much the same as they are here with one key difference.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/1f0b6_?ak_action=api_record_view&amp;id=2919&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/ecPGxCbOI4uBQIDBo3cA6_bAhrk/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/1f0b6_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/ecPGxCbOI4uBQIDBo3cA6_bAhrk/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/1f0b6_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/8f684_VZ2q4bBTPCc" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/3-column-css-layout-fixed-width-and-centered-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>3 Column CSS Layout: Fixed Width And Centered</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/3-column-css-layout-fixed-width-and-centered/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/3-column-css-layout-fixed-width-and-centered/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:05:17 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[column layout]]></category>
		<category><![CDATA[css layout]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[detailed explanation]]></category>
		<category><![CDATA[div id]]></category>
		<category><![CDATA[divs]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[lt]]></category>
		<category><![CDATA[Sidebar]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/3-column-css-layout-fixed-width-and-centered/</guid>
		<description><![CDATA[Last week I shared the code I use to start a 2 column fixed width layout. Today I want to expand that code and share how I&#8217;d build a 3 column layout that&#8217;s also of fixed width and centered on the page. Many of the concepts will be the same as in the previous post [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I shared the code I use to start a <a href="http://www.vanseodesign.com/css/2-column-layout-code/">2 column fixed width layout</a>. Today I want to expand that code and share how I&#8217;d build a 3 column layout that&#8217;s also of fixed width and centered on the page.<br />
<span></span><br />
Many of the concepts will be the same as in the previous post so I&#8217;ll skip some of the details here. If you need more explanation than this post has I&#8217;ll refer you back to the <a href="http://www.vanseodesign.com/css/2-column-layout-code/">2 column layout post</a>.</p>
<p>There will be some new concepts when we try to move the columns around for which I&#8217;ll offer a more detailed explanation.</p>
<p>For those who prefer to skip the explanation here&#8217;s a <a href="http://www.vanseodesign.com/blog/demo/3-column-css/index.php">demo</a> of what we&#8217;ll be building and you can view the source for the code.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/3-column-css/index.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/46834_primary-main-secondary.png" alt="3 column layout: primary sidebar main content secondary sidebar" width="465" height="250" /></a></p>
<h2>The HTML</h2>
<p>As with the 2 column layout, the html for a 3 column layout is rather simple. In fact the only real difference is one additional div for our third column.</p>
<pre>
<span>&lt;div id=<span>&quot;container&quot;</span>&gt;</span>
        <span>&lt;div id=<span>&quot;header&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Header<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;primary&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Primary Sidebar<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Main content<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;secondary&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Secondary Sidebar<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span>
		<span>&lt;p&gt;</span>Footer<span>&lt;/p&gt;</span>
	<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>Instead of using sidebar-1 and sidebar-2 I&#8217;m calling the sidebars primary and secondary. You&#8217;re free to call them whatever works best for you.</p>
<p>One point to make about the html is the order of the divs. If you remember last week we moved the columns simply by changing the direction of <a href="http://www.vanseodesign.com/css/understanding-css-floats/">floated divs</a>. We&#8217;ll do the same here, but that alone won&#8217;t allow us to reorder the columns in all possible ways.</p>
<p>I&#8217;ll get to the details in a bit, but with 3 columns there are 6 potential ways to order those columns. We can achieve 4 of those 6 ways just by changing the direction of the floats. For the last 2 we&#8217;ll need to use some relative and absolute positioning.</p>
<p><a href="http://www.panic.com/coda/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/2c1db_css-coda-3.jpg" alt="CSS tab inside Coda editor by Panic" width="465" height="219" /></a></p>
<h2>The CSS</h2>
<p>Once again the css is rather simple and should be familiar if you read the previous post. And just as with the <a href="http://www.vanseodesign.com/blog/demo/2-col-css.html">2 column demo</a> I&#8217;ve stripped away css that&#8217;s only there to make the demo more presentable. Here&#8217;s the css we need for this layout</p>
<pre>
#container {
	width: 960px;
	margin: 0 auto;
}
#primary {
	float: left;
	width: 240px;
}
#content {
	float: left;
	width: 480px;
}
#secondary {
	float: left;
	width: 240px;
}
#footer {
	clear: both;
}
</pre>
<p>There really isn&#8217;t anything new here when compared to the 2 column layout. We&#8217;ve used our container div to <a href="http://www.vanseodesign.com/css/centering-with-css/">center everything on the page</a> and floated our columns to the left. Lastly we cleared the footer.</p>
<p>If you need explanation about what&#8217;s going on please see that explanation in the 2 column layout post.</p>
<p>While I&#8217;ve floated all 3 divs to the left, you could also float the rightmost column to the right. In this case that would our #secondary div.</p>
<p>I typically float all columns in the same direction, though I think it&#8217;s more common to float the rightmost div to the right. Like I mentioned last week, I&#8217;m unaware of either being better or worse.</p>
<p>Floating everything in one direction made it easier for me to understand when I first started working with floats and now it&#8217;s become habit.</p>
<p><a href="http://www.flickr.com/photos/1967chevrolet/4272868759/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/a79c9_columns.jpg" alt="Columns - Temple of a Thousand Warriors" width="465" height="294" /></a></p>
<h2>Rearranging the Columns</h2>
<p>The first way to rearrange columns is to reorder their divs in the html. When first developing a site you&#8217;ll likely structure your html how you want the columns to display on the page.</p>
<p>There will be times though when you want to move the columns around after the site is live or because you want to the columns to have different orders on different pages without having to change the html.</p>
<p>Fortunately we can rearrange the columns through css alone and doing so will hopefully make for a good learning experience.</p>
<p>I mentioned above there were 6 possible ways we could order the 3 columns.</p>
<ul>
<li>primary, content, secondary</li>
<li>secondary, content, primary </li>
<li> content, secondary, primary </li>
<li>primary, secondary, content</li>
<li>secondary, primary, content</li>
<li>content, primary, secondary </li>
</ul>
<p>Not the most logical order to list them I admit, but there&#8217;s a reason why I&#8217;ve listed them this way.</p>
<p>The first order above (primary, content, secondary) we&#8217;ve already coded. The next 3 on the list we can get to by changing float directions. For the last two we&#8217;ll need to mix in some positioning.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/3-column-css/secondary-main-primary.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/a79c9_secondary-content-primary.png" alt="3 column layout: secondary sidebar, main content, primary sidebar" width="465" height="155" /></a></p>
<h3>Secondary, Content, Primary</h3>
<p>When we float all 3 columns in the same direction they will always display in the same order they appear in the html. That will be true regardless of whether we float all 3 to the left (as we&#8217;ve done above) or to the right.</p>
<p>If we float all 3 divs to the right we&#8217;ll get the reverse order of how they appear in the html, which is all we need to achieve this column order.</p>
<p>The easiest way then to have all 3 columns display in the same sequential order as they appear in the html is to float all 3 in the same direction either left or right.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/3-column-css/primary-secondary-main.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/5efdc_primary-secondary-content.png" alt="3 column layout:  primary sidebar, secondary sidebar, main content" width="465" height="154" /></a></p>
<h3>Primary, Secondary, Content</h3>
<p>To get the next two layouts on the list we&#8217;ll change the direction of a single float so it&#8217;s in the opposite direction of the other two.</p>
<p>When we float any 2 of the 3 columns in one direction and float the third in the opposite direction, the one floated opposite will sit at the outermost edge in the direction it&#8217;s floated.</p>
<p>If we want to move our main content div to the right we&#8217;ll float our main content to the right and keep primary and secondary floated to the left.</p>
<p>As you might expect the two sidebars display to the left of the content in the order they appear in the html. In our case the primary column will be leftmost and the secondary column will appear to it&#8217;s right.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/3-column-css/main-secondary-primary.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/5efdc_content-secondary-primary.png" alt="3 column layout: main content, secondary sidebar, primary sidebar" width="465" height="155" /></a></p>
<h3>Content, Secondary, Primary</h3>
<p>Similarly if we want our primary column to be the rightmost column we float it to the right and float the other 2 columns to the left.</p>
<p>Again if 2 columns are floated in one direction and the third is floated opposite the opposite will display at the far end of the same direction it&#8217;s floated and the other 2 columns will display in the order seen in the html.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/3-column-css/secondary-primary-main.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/dfe20_secondary-primary-content.png" alt="3 column layout:  secondary sidebar, primary sidebar, main content" width="465" height="155" /></a></p>
<h3>Secondary, Primary, Content</h3>
<p>Unfortunately we need to do more than change float directions to get the last 2 orders.</p>
<p>Let&#8217;s think for a moment about how we might go about setting up this column order. Since we want the main content column to be rightmost let&#8217;s start by floating it to the right.</p>
<p>One of our 3 columns is now where want. We&#8217;re left needing to swap the order of the primary and secondary columns.</p>
<p>Your first instinct might be to float the primary column to the right, but that will place it to the right of the main content. What we need to do is add some positioning. Fortunately we don&#8217;t need to add a lot.</p>
<p>I won&#8217;t be able to offer a full explanation for how positioning works here so I&#8217;ll direct you to my post on <a href="http://www.vanseodesign.com/css/css-positioning/">understanding css positioning</a> if you need a more detailed explanation for why the following works.</p>
<p>First we&#8217;ll add relative positioning to our container div</p>
<pre>
#container {position: relative}
</pre>
<p>This won&#8217;t affect our #container div at all, but it will allow us to position columns relative to the container div. If we skip this we&#8217;ll be positioning columns relative to the body of our html.</p>
<p>Next we&#8217;ll remove the float and add absolute positioning to the primary sidebar.</p>
<pre>
#primary {position: absolute}
</pre>
<p>If we stop here something strange happens. Our primary column hasn&#8217;t moved, but our secondary column seems to have vanished.</p>
<p><a href="http://www.vanseodesign.com/css/css-resets-pros-cons/">By default</a> our primary column will have a value of 0 for it&#8217;s left property, which keeps it right where it was. However by changing from a float to position the primary column no longer holds the secondary column to its right.</p>
<p>Our secondary column is now hiding behind our primary column. Understanding why is a matter of <a href="http://www.vanseodesign.com/css/css-stack-z-index/">understanding the css stack and the z-index property</a>.</p>
<p>We need to move the primary column further to the right, which will also reveal the secondary column. We do so by increasing the value of left to be equal to the width of the secondary column</p>
<pre>
#primary {left: 240px}
</pre>
<p>And now all 3 columns are displaying exactly where we want.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/3-column-css/main-primary-secondary.php"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/dfe20_content-primary-secondary.png" alt="3 column layout: main content, primary sidebar, secondary sidebar" width="465" height="154" /></a></p>
<h3>Content, Primary, Secondary</h3>
<p>To get our last layout we need to reverse the order of the columns we just set up above. </p>
<p>Here we want the content on the left and the secondary column on the right so let&#8217;s switch the direction of the floats for both.</p>
<p>Not bad. We&#8217;re almost there. In fact the only problem at this point is the primary div isn&#8217;t far enough to the right. We just need to alter it&#8217;s left value to match the width of the content.</p>
<pre>
#primary {left: 480px}
</pre>
<p>and we&#8217;re done.</p>
<p>We used the same basic concept in both of the above orders.</p>
<p>The column we wanted to be furthest left we float left. The column we wanted to be furthest to the right we float right. For the column we want in between we used absolute positioning and gave it a left value equal to the width of the leftmost column.</p>
<p>We also made sure to add relative positioning to the container div.</p>
<p><strong>Note:</strong> Like our 2 column layout this won&#8217;t create columns of equal height as it appears in the <a href="http://www.vanseodesign.com/blog/demo/3-column-css/index.php">demo</a>. The columns have equal height because I set their heights to the same value. Creating equal height columns is something for another time, though I promise to write a post about how before too long if you&#8217;re interested.</p>
<p><a href="http://www.flickr.com/photos/riebart/4466482623/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/b1c72_code.jpg" alt="A section of code from Kate code editor" width="465" height="309" /></a></p>
<h2>Summary</h2>
<p>Setting up the css for a 3 column layout isn&#8217;t really any harder than setting up the css for a 2 column layout. The same principle of floating all the columns in the same direction applies.</p>
<p>If you&#8217;ve understood this and the last post you should now be able to create 4 and 5 column layouts as well.</p>
<p>What&#8217;s a little trickier is rearranging the columns. We changed the float direction of columns to achieve several column layouts and used positioning to get to a couple more.</p>
<p>If you&#8217;ve been following along you now have several different methods for setting up multi-column <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-1/">css layouts</a> regardless of how many columns and regardless of the order those columns appear in your html.</p>
<p>I&#8217;d encourage you to play around.  Change floats and position different columns. Try adding a 4th column and see how you can reorganize all of them.</p>
<p>In this and the last post I&#8217;ve given you some instructions for moving blocks around on a web page. Spend some time moving those blocks around. The more you experiment on your own, the greater you&#8217;ll understand how and why this all works.</p>
<p>Next week I&#8217;ll continue with fully fluid layouts. The principles will be very much the same as they are here with one key difference.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/49e9c_?ak_action=api_record_view&amp;id=2919&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/ecPGxCbOI4uBQIDBo3cA6_bAhrk/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/49e9c_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/ecPGxCbOI4uBQIDBo3cA6_bAhrk/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/46504_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/d47ad_VZ2q4bBTPCc" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/3-column-css-layout-fixed-width-and-centered/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Use Golden Section Proportions In Your Designs</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-use-golden-section-proportions-in-your-designs/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-use-golden-section-proportions-in-your-designs/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:04:05 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[divine proportion]]></category>
		<category><![CDATA[fibonacci sequence]]></category>
		<category><![CDATA[golden proportions]]></category>
		<category><![CDATA[greek art]]></category>
		<category><![CDATA[human creation]]></category>
		<category><![CDATA[number phi]]></category>
		<category><![CDATA[phi phi]]></category>
		<category><![CDATA[spiral shape]]></category>
		<category><![CDATA[what is the golden ratio]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-use-golden-section-proportions-in-your-designs/</guid>
		<description><![CDATA[&#8220;The power of the golden section to create harmony arises from its unique capacity to unite different parts of a whole so that each preserves its own identity and yet blends into the greater pattern of a single whole.&#8221; &#8212; Gy&#246;rgy D&#243;czi, The Power of Limits Golden section proportions can be found in both nature [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>
&#8220;The power of the golden section to create harmony arises from its unique capacity to unite different parts of a whole so that each preserves its own identity and yet blends into the greater pattern of a single whole.&#8221;<br />
&mdash; Gy&ouml;rgy D&oacute;czi, <em>The Power of Limits</em>
</p>
</blockquote>
<p>Golden section <a href="http://www.vanseodesign.com/web-design/size-scale-proportion/">proportions</a> can be found in both <a href="http://xgoldensection.com/xgoldensection.html">nature</a> and man-made structures. They exist in the proportions of human beings, the growth patterns of plants, animals, and insects, and structures like Stonehenge and the Parthenon.<br />
<span></span><br />
Golden section proportions are also present in <a href="http://milan.milanovic.org/math/english/golden/golden4.html">Greek art</a>, writing,  and architecture, and in the spiral shape of shells.</p>
<p>Whether we&#8217;ve been genetically programmed to like them or we find them pleasing due to all the examples around us, the golden section has clearly been a part of nature and human creation throughout history.</p>
<p>We <a href="http://www.presentationzen.com/presentationzen/2005/08/from_wabisabi_t.html">have a preference</a> toward objects that use golden proportions.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/b0d1d_stonehenge.jpg" alt="Stonehenge" width="465" height="310" /></p>
<h3>What is the Golden Ratio?</h3>
<p>The <a href="http://en.wikipedia.org/wiki/Golden_section">golden ratio</a> is one where the ratio of the smaller segment to the larger segment is the same as the larger segment to the sum of both segments.  This is more easily seen in a simple diagram.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/96aa8_golden-ratio.png" alt="Golden ratio" width="465" height="183" /></p>
<p>The golden ratio or <a href="http://www.markboulton.co.uk/journal/comments/design-and-the-divine-proportion">divine proportion</a> is a visual representation of the <a href="http://goldennumber.net/">golden number Phi (&Phi;)</a> which is approximately 1.618.</p>
<h4>The Fibonacci Sequence</h4>
<p>The mathematics behind the golden ratio is heavily connected to the <a href="http://en.wikipedia.org/wiki/Fibonacci_sequence">Fibonacci Sequence</a>. If you&#8217;re unfamiliar with the fibonacci sequence, it begins by definition with the numbers 0, 1 and then each successive number in the sequence is the sum of the previous two numbers.</p>
<p>0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55&#8230; </p>
<p>I&#8217;ll spare you the deep mathematics talk (we&#8217;ll just do a bit of division), since what we&#8217;re mainly interested in is how the sequence relates to the <a href="http://freemasonry.bcy.ca/symbolism/golden_ratio/index.html">golden section</a>.</p>
<p>If you take any number in the sequence and divide it by the previous number the result approximates Phi or the golden ratio.</p>
<p>With early numbers in the sequence this may not appear to be true, but as we continue along the sequence the division approaches 1.618 rather quickly.</p>
<ul>
<li>2/1 = 2.0</li>
<li>3/2 = 1.5</li>
<li>5/3 = 1.67</li>
<li>8/5 = 1.6</li>
<li>13/8 = 1.625</li>
<li>21/13 = 1.615</li>
<li>34/21 = 1.619</li>
<li>55/34 = 1.6176</li>
</ul>
<p>As you might expect the <a href="http://www.bardoodle.com/Golden-Section.htm">Fibonacci sequence</a> is also found in art and nature. Some have argued that Virgil used the sequence in the poetry of the Aenid. It&#8217;s found in the musical compositions of Mozart.</p>
<p>Vitruvious, da Vinci, and Durer used it to create divine proportions of man.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/b40d7_da-vinci.jpg" alt="da Vinci's divine proportions of man" width="465" height="642" /></p>
<p>The ratio of the numbers 13/8 are found in pine cone spirals and the ratio of numbers 34/21 are found in the spiral of a sunflower.</p>
<p>Many <a href="http://www.vanseodesign.com/web-design/biophilia-effect/">biological</a> growth patterns approach the golden section instead of being exact in the same way the Fibonacci Sequence approaches the golden section ratio.</p>
<h3>Golden Section Shapes</h3>
<p>When people think of shapes with golden section ratios they typically think of a <a href="http://mathworld.wolfram.com/GoldenRectangle.html">golden rectangle</a> where one side divided by the other is 1.618. However, a variety of <a href="http://www.smashingmagazine.com/2010/02/09/applying-mathematics-to-web-design/">mathematics can be applied</a> to different layouts and a variety of shapes can be constructed from golden section proportions.</p>
<p><a href="http://goldennumber.net/geometry.htm"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/b40d7_golden-shapes.png" alt="Golden Shapes" width="465" height="167" /></a></p>
<p>You can create golden rectangles, triangles, ellipses, pentagrams, and spirals. Think outside the box or in this case outside the golden rectangle. Click the image above to see how some golden shapes can be constructed.</p>
<h3>How to Use the Golden Section in Design</h3>
<p>Hopefully some of the above has convinced you of the aesthetic qualities of golden section proportions. Now how do you actually <a href="http://www.smashingmagazine.com/2008/05/29/applying-divine-proportion-to-web-design/">apply these principles in your design</a> and when might you use them?</p>
<p>The first use of the golden section is when <a href="http://www.vcarrer.com/2009/02/golden-grid.html">creating a grid</a> for your design. Let&#8217;s consider a simple case of a two column layout with a fixed width of 960px. This is a rather standard layout and width.</p>
<ul>
<li>960 px / 1.618 = 593 px</li>
<li>960 px &#8211; 593 px = 367 px</li>
</ul>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/03e64_golden-rectangle.png" alt="Golden Rectangle" width="465" height="345" /></p>
<p>From the above our content column would be 593 px and our sidebar would be 367 px. An even better approach if we&#8217;d like our design to be fluid would be to use % or em as a measurement.</p>
<p>If we stick with 960 px for the overall width of our layout and assume a default font size of 16px then:</p>
<ul>
<li>960px / 16px = 60em (total width)</li>
<li>60 * 61.8% = 37 em (larger section)</li>
<li>60em &#8211; 37 em = 23 em (smaller section)</li>
</ul>
<ul>
<li>60 / 37 = 1.62</li>
<li>37 / 23 = 1.61</li>
</ul>
<p>Not exactly Phi, but very close.</p>
<p>Mark Boulton has an excellent post running you through <a href="http://www.markboulton.co.uk/journal/comments/five-simple-steps-to-designing-grid-systems-part-5">constructing an adaptive gird</a> this way as well as providing the css to make it happen. Mark links to a simple demo in his article and you can see a more <a href="http://nickcowie.com/other/golden_section.html">realistic demo here</a>.</p>
<p>The above is all about dividing your page horizontally using the golden ratio. Dividing the page vertically is <a href="http://jasonsantamaria.com/articles/whats-golden/">another matter</a>.</p>
<p>In print design you can control both the height and width of the page. In web design the height of the page tends to vary based on the content. You could set an absolute height if you want, though it&#8217;s generally not practical.</p>
<p>Where it might be more appropriate to use <a href="http://net.tutsplus.com/tutorials/other/the-golden-ratio-in-web-design/">the golden section in web design</a> is to create buttons using golden section proportions or look to different sections of your page and see if a golden ratio will work <a href="http://www.usabilitypost.com/2011/04/22/designing-ux-exchange/">when deciding what size they should be</a>.</p>
<p>For example on many <a href="http://www.vanseodesign.com/web-design/home-page-design/">home pages</a> the main content will leave out the second column and create a single column for the one page. Your content area could use a height of 593 px (assuming a 960 px width layout) and become a golden section rectangle.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/a5e44_golden-section-home-page.png" alt="Golden Section Home Page" width="465" height="389" /></p>
<p>Other <a href="http://www.vanseodesign.com/css/creating-shapes-with-css-borders/">shapes</a> you add to your design (ellipses, triangles) could be constructed as golden section shapes. You could use the golden ratio when setting width and height of any images you include in your design.</p>
<p>Essentially any place where the dimensions of an element will be fixed a golden shape can be created.</p>
<p>Below are links to resources and tutorials to help you build golden section grids:</p>
<ul>
<li><a href="http://www.layersmagazine.com/illustrator-design-goldensection.html">Illustrator: Golden Section</a></li>
<li><a href="http://www.thegridsystem.org/categories/templates/">Grid Templates from The Grid System</a></li>
<li><a href="http://code.google.com/p/the-golden-grid/">PSD Template for the Golden Grid</a></li>
<li><a href="http://powerretouche.com/Divine_proportion_tutorial.htm">Golden Section plugin for various image editing programs</a></li>
<li><a href="http://www.vcarrer.com/2009/05/o-rule-golden-proportion-for.html">O rule + golden proportion for calculating the gutter in the grid</a></li>
<li><a href="http://www.gridsystemgenerator.com/gs02.php">Golden Grid system generator</a></li>
</ul>
<p>Another interesting application for the golden section is in setting up a <a href="http://www.vanseodesign.com/web-design/size-scale-proportion/">typographic scale</a>. Tim Brown recently described how he set up a modular scale based on the golden ratio in a recent post for A List Apart titled <a href="http://www.alistapart.com/articles/more-meaningful-typography/">More Meaningful Typography</a>.</p>
<h3>The Rule of Thirds: A Simplified Golden Section</h3>
<p>Consider again the Fibonacci sequence, particularly the early numbers in the series. Using the numbers 2 and 3 from the series we get a simple approximation of the golden section as 1.667. (2/3), which leads us to the <a href="http://www.uvsc.edu/disted/decourses/dgm/2740/IN/steinja/lessons/05/l05_05.html">rule of thirds</a>.</p>
<p>A <a href="http://www.vanseodesign.com/css/2-column-layout-code/">2-column website</a> could make use of this rule of thirds to have a content area 2/3 the width of the whole and a sidebar 1/3 the width. It&#8217;s similar to what we did above without all the math.</p>
<p>The <a href="http://articles.sitepoint.com/article/principles-beautiful-web-design/3">rule of thirds</a> is often applied to images in order to create more interest. By dividing an image into thirds both horizontally and vertically you create a grid of 9 rectangles.</p>
<p>You want to <a href="http://www.vanseodesign.com/web-design/design-basics-alignment/">align important elements</a> of the image around the central rectangle, ideally at any of the 4 corners of that rectangle. This creates tension and adds interest and energy to your composition.</p>
<p><a href="http://www.vanseodesign.com"></a></p>
<p>The image above is one I captured in Cooperstown, NY, just down the road from the <a href="http://baseballhall.org/">Baseball Hall of Fame</a>. In the original picture the lighthouse is centered horizontally and it&#8217;s hardly a great image.</p>
<p>I cropped it so the lighthouse aligns along the right edge of the central rectangle and the horizon aligns along the bottom edge of the same rectangle. The cropped image while, still not one that will win any awards is much stronger than the original.</p>
<p>Mouse over the image to see the &#8220;rule of thirds&#8221; grid.</p>
<p>Again with web design we might not be able to do this for our entire <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-1/">layout</a>, since our height is likely a variable. However the rule of thirds can be particularly effective when used to crop images for maximum impact.</p>
<p>You could also use the rule of thirds for placing elements within a fixed dimension section of your layout such as the single column home page layout described above.</p>
<h3>Summary</h3>
<p>Phi (&phi;), the Fibonacci sequence, and the golden ratio are seen again and again in nature as well as in <a href="http://www.goldenmuseum.com/0805Painting_engl.html">art</a>, <a href="http://britton.disted.camosun.bc.ca/goldslide/jbgoldslide.htm">architecture</a>, music, and design.</p>
<p>Whether we&#8217;re genetically predisposed to find golden proportions <a href="http://www.vanseodesign.com/web-design/meaningful-design-aesthetics/">aesthetically pleasing</a> or we&#8217;ve simply trained ourselves over history to find it so, there&#8217;s no denying golden sections show up again and again in nature and  many man-made structures.</p>
<p>The next time you&#8217;re considering a grid for a website design think about the golden section and how you might use it. You don&#8217;t want to arbitrarily force golden proportions into your design, however they can make for pleasing proportions.</p>
<p>Consider using them for geometrical and organic constructions, particularly those involving rhythm and <a href="http://www.vanseodesign.com/web-design/design-unity/">harmony</a> among multiple elements.</p>
<p>Your visitors may not know why they find your site attractive, but they will likely respond favorably to golden section proportions in your design.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/65e1c_?ak_action=api_record_view&amp;id=2902&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/KmA-Uv2jlfAiH6EjBBdAS84Odpg/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/65e1c_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/KmA-Uv2jlfAiH6EjBBdAS84Odpg/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/65e1c_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/7d5b3_h2QzWFcgR-A" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-use-golden-section-proportions-in-your-designs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2 Column CSS Layout: Fixed Width And Centered</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-column-css-layout-fixed-width-and-centered/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-column-css-layout-fixed-width-and-centered/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:03:16 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[boilerplate code]]></category>
		<category><![CDATA[column layout]]></category>
		<category><![CDATA[content area]]></category>
		<category><![CDATA[css layout]]></category>
		<category><![CDATA[div id]]></category>
		<category><![CDATA[divs]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[lt]]></category>
		<category><![CDATA[single word]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-column-css-layout-fixed-width-and-centered/</guid>
		<description><![CDATA[One of the more common css layout patterns you&#8217;ll come across is the fixed width 2 column layout. It&#8217;s relatively easy to code and understand, though it sometimes trips up developers new to css layouts. A few weeks ago I promised to offer boilerplate code for some common css layout patterns. This is the first [...]]]></description>
			<content:encoded><![CDATA[<p>One of the more common <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-1/">css layout patterns</a> you&#8217;ll come across is the fixed width 2 column layout. It&#8217;s relatively easy to code and understand, though it sometimes trips up developers new to css layouts.<br />
<span></span><br />
A few weeks ago I promised to offer boilerplate code for some common <a href="http://www.vanseodesign.com/css/css-layout-patterns-part-2/">css layout patterns</a>. This is the first of that boilerplate code and I&#8217;ll continue to offer more in the coming weeks.</p>
<p>If you prefer to skip the explanation and get right to the code you can view the source of the <a href="http://www.vanseodesign.com/blog/demo/2-col-css.html">demo</a>. Note that I&#8217;ve added some extra css just to make the demo more presentable.</p>
<p><a href="http://www.vanseodesign.com/blog/demo/2-col-css.html"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/6054d_2-col-demo.png" alt="2 column css layout with sidebar on right" width="465" height="251" /></a></p>
<h2>The HTML</h2>
<p>The html for this layout is rather simple as you can see below.</p>
<pre>
<span>&lt;div id=<span>&quot;container&quot;</span>&gt;</span>
	<span>&lt;div id=<span>&quot;header&quot;</span>&gt;</span>
		header content here
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;content&quot;</span>&gt;</span>
		main content here
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;sidebar&quot;</span>&gt;</span>
		sidebar content here
	<span>&lt;/div&gt;</span>
	<span>&lt;div id=<span>&quot;footer&quot;</span>&gt;</span>
		footer content here
	<span>&lt;/div&gt;</span>
<span>&lt;/div&gt;</span>
</pre>
<p>We have a single div for each of the 4 main areas of the layout &mdash; header, content, sidebar, and footer. All four divs are wrapped inside a container div, which we&#8217;ll use to center and set the width of the page.</p>
<p>One thing to note is the structure of the html above follows the structure of the page itself. The header comes first in both and the footer comes last. The content area div is before the sidebar.</p>
<p>Later in this post I&#8217;ll offer two ways to change the layout above so the sidebar is to the left of the content. One of those ways is as simple as changing a single word in the css.</p>
<h2>The CSS</h2>
<p>If you&#8217;ve already viewed the source code of the demo you&#8217;ll note the css like the html is rather simple. In fact most of that css has been added solely to make the demo a little more presentable.</p>
<p>Here&#8217;s all the css you need for this layout minus the stuff to make the demo more presentable.</p>
<pre>
#container {
	width:960px;
	margin:20px auto;
}
#content {
	float:left;
	width:620px;
}
#sidebar {
	float:left;
	width:340px;
}
#footer {
	clear:both;
}
</pre>
<p>If you combine this css with the html above you&#8217;ll have a 2 column layout that&#8217;s 960px wide. Let&#8217;s walk through the css one div at a time.</p>
<p><strong>#container</strong> &mdash; We&#8217;re using the container div so we can set the overall width of the layout (960px) and then <a href="http://www.vanseodesign.com/css/centering-with-css/">center the layout</a> on the page.</p>
<p>The 20px top and bottom margin is arbitrary. I added it to give the demo a little room to breathe. The magic is done by setting auto on the left and right margins, which when combined with an explicit width, centers the layout on the page</p>
<p>Some people prefer not to use a container div and instead use the body tag as the container. I like using a separate container div, but either will work. If you&#8217;d rather not include the container div just remove it from the html above and move the css I show here from #container to body.</p>
<p><strong>#header</strong> &mdash;  No css is needed for the header div. By default its width will be 100% of it&#8217;s container and by default it will position itself as far to the top and left as it can.</p>
<p>These <a href="http://www.vanseodesign.com/css/css-resets-pros-cons/">defaults are exactly what we want</a> so there&#8217;s no need to add more. A big part of understanding css layouts is realizing you often don&#8217;t need to do anything.</p>
<p><strong>#content</strong> &mdash; The important css is the float: left. It isn&#8217;t needed to have the <a href="http://www.vanseodesign.com/css/cross-browser-css/">browser render</a> the div where we want, however floating the content is necessary to have the sidebar div sit next to it.</p>
<p>The width is arbitrary. You can set it to be anything you want as long as the sum of the content and sidebar widths is less than or equal to the width of the container div.</p>
<p><strong>#sidebar</strong> &mdash; Like the container, the sidebar is floated left, which is typically how I code this layout in practice. You could also float the sidebar to the right. Which you use is personal preference.</p>
<p>I&#8217;m unaware of any advantage or disadvantage to either approach. I usually float both to the left, though it&#8217;s simply because that&#8217;s how I first did it and now it&#8217;s become habit.</p>
<p>As with the content div the width here is arbitrary, except as noted above.</p>
<p><strong>#footer</strong> &mdash;  All we need to do with the footer is clear the two floated divs to ensure it sits below them. Since both content and sidebar were floated to the left we could have used clear: left instead of clear: both, but using clear: both is more flexible as we&#8217;ll see below.</p>
<p>Like the header the width of the footer will be 100% of the container which is what we want.</p>
<p>The rest of the css I&#8217;ve used in the demo is simply to make it more presentable.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/6054d_box.png" alt="css box model" width="465" height="278" /></p>
<h3>Floated Elements</h3>
<p>If you don&#8217;t have experience using floats you may be wondering why the above works. It&#8217;s a little much to explain in a few short sentences so I&#8217;ll direct you to a couple of others posts I&#8217;ve written in a moment.</p>
<p>The gist is that every element in an html document is <a href="http://www.vanseodesign.com/css/css-positioning/">defined by a rectangular box</a>. There are two types of boxes, block and inline.</p>
<p>Divs are block level boxes, which are laid out vertically in the normal document flow. The box carves out a space forcing the next box to sit below it.</p>
<p>Floated elements are removed from the normal document flow and shifted as far left or right as possible. Other elements are allowed to flow around or next to them.</p>
<p>By floating both our content and sidebar divs above we break them out of the normal document flow and allow them to sit next to each other.</p>
<p>By clearing the footer div we get it to behave as though the the two floated divs are in the normal document flow and so the footer drops below them.</p>
<p>I realize that&#8217;s not much of an explanation. For a more in depth explanation of the <a href="http://www.w3.org/TR/css3-box/">css box model</a> and floated elements you can read the 2 posts below.</p>
<ul>
<li><a href="http://www.instantshift.com/2009/11/16/css-box-model-the-foundation-for-improving-your-css/">CSS Box Model: The Foundation For Improving Your CSS</a></li>
<li><a href="http://www.vanseodesign.com/css/understanding-css-floats/">Understanding CSS Floats</a></li>
</ul>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/f4fe8_2-col-demo-sidebar-left.png" alt="2 column css layout with sidebar on left" width="465" height="252" /></p>
<h2>Changing the Position of the Content and Sidebar</h2>
<p>I mentioned above there were 2 ways to change this layout so the sidebar is on the left of the content instead of the right. Both are very simple to implement</p>
<p>The first is to change the order of the divs in the html. The sidebar being first will float to the left edge of the browser and the content will float as far to the left as it can go, which is against the right edge of the sidebar.</p>
<p>When I know in advance I want the sidebar to be on the left I generally place it first in the html.</p>
<p>The second way is even easier. Just float the content div to the right instead of to the left.</p>
<pre>
 #content {float: right}
</pre>
<p>This is why we cleared our footer on both sides instead of just the left.</p>
<p>The above css shows off the power and flexibility of css layouts. By changing a single word in a single css file we can move columns from one side of our layout to the other. We&#8217;ll see the full power of this with the code for a 3 column layout I&#8217;ll share next week.</p>
<p>It&#8217;s not something you&#8217;ll do often, but think about how much time and effort it would take to move columns around with a <a href="http://www.vanseodesign.com/css/css-divs-vs-tables/">table-based layout</a>.</p>
<h2>Equal Height Columns</h2>
<p>I should point out that this layout doesn&#8217;t automatically create columns of equal height. The demo makes it appear like it does, but that&#8217;s only because I set the height of the content and sidebar to be the same to make the presentation nicer visually.</p>
<p>The height of each of the 4 main divs will will expand and contract based on what&#8217;s inside and most of the time that means they won&#8217;t have the same height.</p>
<p>Creating equal height columns is a bit trickier, though possible, and there are several methods for making it happen. I&#8217;ll save those for another post.</p>
<h2>Summary</h2>
<p>I hope you can see how easy it is to set up a 2 column fixed width layout. There&#8217;s really very little html and css needed. An important part of css layouts is understanding you need less css than you think.</p>
<p>The key to this layout is floating the 2 divs we want to sit next to each other and then clearing the first div that comes after them, which in our case is the footer.</p>
<p>From here it&#8217;s all about filling up each of the 4 main divs with content, though that will be specific to your project.</p>
<p>One thing I would suggest is taking this code and play around with it. Reorder the divs, remove a float, change a float from left to right, and try clearing the footer to the left or right only and see what happens.</p>
<p>You have 4 blocks to play with and a few simple lines of html and css to move them around. The more you play, the better you&#8217;ll understand how and why this all works and the easier it will be for you to create more complex layouts like the 3 column layout I&#8217;ll offer next week.</p>
<p>Have fun.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/1eb3c_?ak_action=api_record_view&amp;id=2897&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/g11wlGkJibyrzByA-ybuddijKOA/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/1eb3c_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/g11wlGkJibyrzByA-ybuddijKOA/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/1eb3c_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/c548c_im1ulYsdfEk" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/2-column-css-layout-fixed-width-and-centered/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Minimalism is the Most Important Design Style to Master</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/why-minimalism-is-the-most-important-design-style-to-master/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/why-minimalism-is-the-most-important-design-style-to-master/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:01:45 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[antoine de saint exupery]]></category>
		<category><![CDATA[artwork design]]></category>
		<category><![CDATA[de saint exupery]]></category>
		<category><![CDATA[Dieter Rams]]></category>
		<category><![CDATA[fundamental features]]></category>
		<category><![CDATA[grid layouts]]></category>
		<category><![CDATA[minimalist design]]></category>
		<category><![CDATA[minimalist designs]]></category>
		<category><![CDATA[what is minimalism]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/why-minimalism-is-the-most-important-design-style-to-master/</guid>
		<description><![CDATA[Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away &#8212; Antoine de Saint-Exupery French writer (1900&#8211;1944) Minimalism is a word I&#8217;m sure you&#8217;ve heard before. It often gets thrown around on design blogs though sometimes carelessly as though the term just means to put [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away<br />
&mdash; <em>Antoine de Saint-Exupery</em> French writer (1900&ndash;1944)
</p>
</blockquote>
<p>Minimalism is a word I&#8217;m sure you&#8217;ve heard before. It often gets thrown around on design blogs though sometimes carelessly as though the term just means to put less on the page.<br />
<span></span><br />
In fairness minimalism can be a hard <a href="http://www.vanseodesign.com/web-design/design-concept-thoughts/">concept</a> to wrap your mind around and it probably means different things to different people.</p>
<p>I want to  explain why I think all web designers would do best to master <a href="http://rainfall-daffinson.com/minimalism/">minimalist design</a> before any other style.</p>
<p><a href="http://theroyalrebel.deviantart.com/art/Minimalism-122015070"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e4c6b_minimalism-2.jpg" alt="Minimalism, because less is more" width="465" height="291" /></a></p>
<h2>What is Minimalism?</h2>
<p>I suppose we should start by trying to define <a href="http://en.wikipedia.org/wiki/Minimalism">minimalism</a>. Here are 2 definitions I found online.</p>
<ul>
<li>Movements in various forms of art and design, especially visual art and <a href="http://www.factmag.com/2010/02/01/a-brief-history-of-minimalism/">music</a>, where the work is stripped down to its most fundamental features.</li>
<li>Simplicity of style in artwork, design, interior design, or literature, achieved by using the fewest and barest essentials or elements to maximum effect</li>
</ul>
<p>Minimalism has also been called ABC art, reductivism, and rejective art and its theories have been <a href="http://minimalstudent.com/zen-and-the-art-of-minimalism-part-1-zen-philosophy/">applied to lifestyle</a>. </p>
<p>Minimalism aims for simplicity and objectivity. It wants to reduce works to the fundamental, the essential, the necessary, and to strip away the ornamental layers that might be placed on top.</p>
<p>Minimalist designs tend toward more <a href="http://www.vanseodesign.com/web-design/whitespace/">whitespace</a>, better typography, grid layouts, and less color. </p>
<p>Mies van der Rohe famously said &#8220;Less is more&#8221; to describe his aesthetic sense of having every element <a href="http://www.vanseodesign.com/blogging/writing-and-design/">serve multiple purposes</a> both visually and functionally. </p>
<p>Buckminster Fuller later reworked the phrase to &#8220;doing more with less&#8221; and Dieter Rams changed it to &#8220;Less but better.&#8221;</p>
<p>All three are saying the same thing. Minimalism is about designing smarter.</p>
<p><a href="http://www.flickr.com/photos/soundman1024/3907741865/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e4c6b_minimalism-7.jpg" alt="Power lines on a cloudy day" width="465" height="309" /></a></p>
<h2>Why You Should Master Minimalism First</h2>
<p>If minimalism is about designing smarter, doing more with less, and reducing design to the fundamentals, it relies on getting <a href="http://www.vanseodesign.com/web-design/7-design-components/">basic design principles</a> right.</p>
<p>You&#8217;re working with less so you need to be able to use the tools you have better. You need a solid grasp of:</p>
<ul>
<li>Grids</li>
<li><a href="http://www.vanseodesign.com/web-design/legible-readable-typography/">Typography</a></li>
<li><a href="http://www.vanseodesign.com/web-design/design-space/">Space</a></li>
<li><a href="http://www.vanseodesign.com/web-design/color-theory/">Color</a></li>
<li><a href="http://www.vanseodesign.com/web-design/design-elements/">Basic design elements</a></li>
</ul>
<p>While simplicity is used to define minimalism, it&#8217;s <a href="http://bloggingbits.com/minimalism-in-web-design/">anything but simple to create a good minimalist design</a>. To master minimalist design means to master design. It&#8217;s harder to pull off because you can&#8217;t hide behind ornament and decoration.</p>
<p>All minimalist designs should not and do not look alike. Minimalism does not mean take everything away until only black text on a white background remains. It means communicating as much as possible with as few elements as possible.</p>
<p>It strikes me that instead of a design being minimalist or not minimalist, it&#8217;s more a case of to what degree does the design embrace minimalism. We can strive toward it, but even the most <a href="http://jonasboner.com/2006/09/06/the-art-of-minimalistic-design/">minimalist design</a> could be reduced further.</p>
<p>None of this should be taken to mean that every design should end up being minimalist. Different design styles set different moods and invoke different emotions in your audience.</p>
<p>Once you&#8217;ve mastered the fundamentals you can add <a href="http://www.vanseodesign.com/web-design/meaningful-design-aesthetics/">meaningful aesthetics</a> on top. Ornamentation works when it has a solid foundation to sit on.</p>
<p>Stylistic details won&#8217;t save a design that fails to execute the fundamentals.</p>
<p><a href="http://ivory-shadow-fox.deviantart.com/art/Minimalism-139515692"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/b311f_minimalism-3.jpg" alt="several lines representing a car" width="465" height="155" /></a></p>
<h2>Summary</h2>
<p>Minimalism is reducing your work to the essential and using less to do more. In order to do minimalism well you need a strong understanding of basic design principles. When you master minimalism you master design.</p>
<p>I&#8217;ll leave you with a few <a href="http://mnmlist.com/quotes/">quotes</a> to hopefully drive the point home.</p>
<blockquote><p>
Everything should be made as simple as possible, but not simpler.<br />
&mdash; <em>Albert Einstein</em>
</p>
</blockquote>
<blockquote><p>
The secret of happiness, you see, is not found in seeking more, but in developing the capacity to enjoy less.<br />
&mdash; <em>Socrates</em>
</p>
</blockquote>
<blockquote><p>
Omit needless words<br />
&mdash; <em>William Strunk Jr. The Elements of Style</em>
</p>
</blockquote>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/4f7a7_?ak_action=api_record_view&amp;id=2883&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/D_YTZFNdrXXohDcS0agqNDsG3h0/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/4f7a7_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/D_YTZFNdrXXohDcS0agqNDsG3h0/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/4f7a7_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/930ed_ASI48HbSPdw" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/why-minimalism-is-the-most-important-design-style-to-master/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Create Designs You Know To Be Good</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-create-designs-you-know-to-be-good/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-create-designs-you-know-to-be-good/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:00:53 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[creative discipline]]></category>
		<category><![CDATA[creative work]]></category>
		<category><![CDATA[daring fireball]]></category>
		<category><![CDATA[finished work]]></category>
		<category><![CDATA[future designs]]></category>
		<category><![CDATA[good taste]]></category>
		<category><![CDATA[ira glass]]></category>
		<category><![CDATA[storytelling]]></category>
		<category><![CDATA[web designer]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-create-designs-you-know-to-be-good/</guid>
		<description><![CDATA[When you finish a new design what do you usually think of it. Do you like it? Hate it? Do you find your work sometimes disappoints you and makes you question your decision to become a web designer? If you&#8217;re in this last group, fear not. There may be a very good and normal reason [...]]]></description>
			<content:encoded><![CDATA[<p>When you finish a new design what do you usually think of it. Do you like it? Hate it? Do you find your work sometimes disappoints you and makes you question your <a href="http://www.vanseodesign.com/web-design/decision-making-styles">decision</a> to become a web designer?<br />
<span></span><br />
If you&#8217;re in this last group, fear not. There may be a very good and normal reason why you feel this way and even better a path to be more satisfied with future designs.</p>
<p>Via <a href="http://daringfireball.net/">Daring Fireball</a> I was pointed to <a href="http://nprfreshair.tumblr.com/post/4931415362/nobody-tells-this-to-people-who-are-beginners-i">this post</a>, which pulls a brief quote from the <a href="http://www.youtube.com/watch?v=BI23U7U2aUY&amp;feature=youtu.be">video below</a> on storytelling by Ira Glass.</p>
<div></div>
<p>While Ira is mainly talking about stories, there&#8217;s some great advice for all creatives.</p>
<p>Many people who go into some form of <a href="http://www.vanseodesign.com/web-design/creativity/">creative work</a> do so in part because they have good taste. You&#8217;re able to judge quality in the creative discipline(s) you choose to pursue.</p>
<p>Unfortunately early on there&#8217;s a gap between what you know to be good and what your skills allow you to create. When you look at your finished work you know it isn&#8217;t good. It tries to be good and has potential to be good, but it&#8217;s lacking something that truly makes it good.</p>
<p>What&#8217;s happening is your taste and ability to judge quality is ahead of your skills to create quality, which opens a gap leading to disappointment in your own work.</p>
<p>Most all creative people go through years of this gap where taste is more developed than skill. Unfortunately many quit before they reach the point where skills catch up to taste.</p>
<p>The best thing you can do to close the gap is a lot of work. Keep doing more projects. Create as much as you can to gain the experience you need. As you create more work you&#8217;ll inevitably close the gap. Your skill will catch up with your taste if you keep at it.</p>
<p><a href="http://www.flickr.com/photos/limaoscarjuliet/3305886294/"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/591ac_mind-the-gap.jpg" alt="Mind the gap" width="465" height="294" /></a></p>
<h2>Using the Gap to Improve</h2>
<p>The video resonates with me for a couple of reasons. First I know I&#8217;m still in the phase where I need to close the gap. It hasn&#8217;t been all that long that I&#8217;ve been designing websites. I&#8217;ve been developing them for awhile, but only designing sites for a few years.</p>
<p>I don&#8217;t think I&#8217;ve yet to create a design that had the something special I was looking for. I&#8217;ve gotten close a few times, but never quite there.</p>
<p>Second I think there&#8217;s more to the story. The gap is more than one between taste and skill. It exists between <a href="http://www.vanseodesign.com/web-design/teach-yourself-design/">theory and practice</a>.</p>
<p>Both theory and practice are important parts of learning. At any point in our careers we can open the gap by taking in more theory. We learn <a href="http://www.vanseodesign.com/web-design/design-elements/">design principles</a>. We study how to <a href="http://www.vanseodesign.com/web-design/visual-grammar/">communicate visually</a> to greater effect.</p>
<p>More practice then closes the gap again. Theory expands what you&#8217;re capable of achieving and practice actually achieves it.</p>
<p>Practice alone won&#8217;t take you past theory. No matter how much you practice you aren&#8217;t going to create a gap where skill outstrips knowledge.</p>
<p>To continue improving we need to consistently open and close the gap.</p>
<ul>
<li><strong>Open gap</strong> &mdash; Initial development of taste and sense of quality</li>
<li><strong>Close gap</strong> &mdash; Practice until you can create quality that matches taste</li>
<li><strong>Open gap</strong> &mdash; Learn more theory</li>
<li><strong>Close gap</strong> &mdash; Apply theory you learned in practice</li>
<li><strong>Open gap</strong> &mdash; Learn more theory</li>
<li><strong>Close gap</strong> &mdash; Apply theory you learned in practice</li>
</ul>
<p>and on and on.</p>
<p>Ideally you&#8217;ll always be both learning new theory and practicing the theory you&#8217;ve learned so the gaps you ultimately open and close don&#8217;t need to be very large. In fact you may never notice them once you&#8217;ve reached a certain point.</p>
<p>Opening the gap sets the new baseline you can reach. Closing the gap reaches the baseline.</p>
<p>I haven&#8217;t closed the initial gap where my design skills have caught up to the taste I&#8217;ve developed throughout life, though I think I&#8217;m getting close. I have closed that gap in other creative areas, but not yet where design is concerned.</p>
<p>I&#8217;ll continue to close and open the gap between theory and skills as a web designer and hope you will too.</p>
<p><a href="http://clockheart.deviantart.com/art/Classroom-1-119254553"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/591ac_classroom-2.jpg" alt="Illustration of an empty classroom" width="465" height="291" /></a></p>
<h2>Additional Resources</h2>
<p>The video at the top of this post is actually part 3 of a 4 part series. All 4 videos are worth watching and each is under 10 minutes. Here are links to all 4 in case you&#8217;d like to watch.</p>
<ul>
<li><a href="http://www.youtube.com/watch?v=loxJ3FtCJJA&amp;feature=relmfu">Ira Glass on Storytelling: Part 1</a></li>
<li><a href="http://www.youtube.com/watch?v=KW6x7lOIsPE&amp;feature=relmfu">Ira Glass on Storytelling: Part 2</a></li>
<li><a href="http://www.youtube.com/watch?v=BI23U7U2aUY&amp;feature=youtu.be">Ira Glass on Storytelling: Part 3</a> (the video above)</li>
<li><a href="http://www.youtube.com/watch?v=baCJFAGEuJM&amp;feature=relmfu">Ira Glass on Storytelling: Part 4</a></li>
</ul>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/a4ea7_?ak_action=api_record_view&amp;id=2875&amp;type=feed" alt="" /></p>
<p><a href="http://feedads.g.doubleclick.net/~a/IBHeyvOH6_TfruWy3_SUUvJRR5w/0/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/a4ea7_di" border="0"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/IBHeyvOH6_TfruWy3_SUUvJRR5w/1/da"><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/a4ea7_di" border="0"></img></a></p>
<div>
</div>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/44cc8_qq8PZOrA--4" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/TheVanBlog">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/web-design/how-to-create-designs-you-know-to-be-good/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Amazing CSS3 techniques you should know</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/amazing-css3-techniques-you-should-know/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/amazing-css3-techniques-you-should-know/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 00:00:07 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[browser width]]></category>
		<category><![CDATA[css tricks]]></category>
		<category><![CDATA[informative tutorial]]></category>
		<category><![CDATA[mask image]]></category>
		<category><![CDATA[mask images]]></category>
		<category><![CDATA[media queries]]></category>
		<category><![CDATA[mobile design]]></category>
		<category><![CDATA[png image]]></category>
		<category><![CDATA[unfortunely]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/amazing-css3-techniques-you-should-know/</guid>
		<description><![CDATA[Color animate any shape with CSS3 and a PNG Let&#8217;s start this compilation with an interesting effect created using only CSS3: A png image with a changing background. The background is using CSS3 transitions. Not the kind of effect you&#8217;ll put on your website, but definitely an interesting demo of what CSS3 can do. View [...]]]></description>
			<content:encoded><![CDATA[<h2>Color animate any shape with CSS3 and a PNG</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/354a6_css3-color-animate.png" alt="" /><br /> Let&#8217;s start this compilation with an interesting effect created using only CSS3: A png image with a changing background. The background is using CSS3 transitions. Not the kind of effect you&#8217;ll put on your website, but definitely an interesting demo of what CSS3 can do.<br /> <strong>View source: <a href="http://jsfiddle.net/chriscoyier/vhKhT/">http://jsfiddle.net/chriscoyier/vhKhT/</a></strong></p>
<h2>Create adaptable layout using CSS3 media queries</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/33338_adaptive-layout.png" alt="" /><br /> CSS3 media queries allow you to adapt a web layout to the browser width. Which means that you can easily create an adaptable layout that fits both big displays and mobile devices. You probably already checked <a href="http://www.catswhocode.com/blog/create-an-adaptable-website-layout-with-css3-media-queries">my article on that subject</a>, so I&#8217;ve picked another informative tutorial written by webdesigner Nick La. A technique any web developer should know!<br /> <strong>View tutorial: <a href="http://webdesignerwall.com/tutorials/adaptive-mobile-design-with-css3-media-queries">http://webdesignerwall.com/tutorials/adaptive-mobile-design-with-css3-media-queries</a></strong></p>
<h2>Dim entire page when certain link is rolled over, css way</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/33338_dim-page.png" alt="" /><br /> Very cool for web apps: Once a particular link is rolled over, the rest of the page is dimmed. This technique may also be a starting point for other great experiments.<br /> <strong>View source: <a href="http://jsfiddle.net/chriscoyier/pVsKe/1/">http://jsfiddle.net/chriscoyier/pVsKe/1/</a></strong></p>
<h2>Clipping text with CSS3 text-overflow</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/33338_elipsis.png" alt="" /><br /> <code>text-overflow</code> is a new CSS3 property which allows you to define how to handle a text which is bigger than its container. This example will show you anything you need to know about this property. Unfortunely, as I&#8217;m writing this post <code>text-overflow</code> is only supported by Opera and IE9.<br /> <strong>View source: <a href="http://www.456bereastreet.com/archive/201105/clipping_text_with_css3_text-overflow/">http://www.456bereastreet.com/archive/201105/clipping_text_with_css3_text-overflow/</a></strong></p>
<h2>Full Browser Width Bars</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/2f5bb_css3-full-bars.png" alt="" /><br /> Another goldie from Chris Coyier: In this tutorial, he&#8217;ll teach you how to create full browser width bars easily.<br /> <strong>View source: <a href="http://css-tricks.com/examples/FullBrowserWidthBars/">http://css-tricks.com/examples/FullBrowserWidthBars/</a></strong></p>
<h2>CSS Mask-Image &#038; Text</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/2f5bb_css-mask-image-text.png" alt="" /><br /> A great text effect using CSS3 and mask images. Unfortunately, the effect is not supported by some browsers, but it degrades gracefully. This effect will probably be very popular when CSS3 will be fully supported by all major browsers.<br /> <strong>View source: <a href="http://trentwalton.com/2011/05/19/mask-image-text/">http://trentwalton.com/2011/05/19/mask-image-text/</a></strong></p>
<h2>Image slider with CSS3 transitions</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e6d3f_css3-transitions.png" alt="" /><br /> Who&#8217;s never heard of JavaScript sliders, such as NivoSlider? That kind of effect is very popular for the past two or three years. With the new CSS3 animations, it is now possible to enhance transitions between images. This tool, called Flux Slider, supports either jQuery or Zepto.js. It works on any browser supporting CSS3 transitions.<br /> <strong>View source: <a href="http://blog.joelambert.co.uk/2011/05/05/flux-slider-css3-animation-based-image-transitions/">http://blog.joelambert.co.uk/2011/05/05/flux-slider-css3-animation-based-image-transitions/</a></strong></p>
<h2>Flared Borders with CSS</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/2eacd_css3-flared-borders.png" alt="" /><br /> Remember that time when you had to create images just to display a box with rounded corners? Thanks to the <code>border-radius</code>, this painful process is no longer needed. This very cool tutorial will show you how to create an element that flares into another using only CSS. The whole code degrades gracefully in older browsers.<br /> <strong>View source: <a href="http://orderedlist.com/blog/articles/flared-borders-with-css/">http://orderedlist.com/blog/articles/flared-borders-with-css/</a></strong></p>
<p> <img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/2eacd_OpDn1Ymf-JI" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/Catswhocode">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/amazing-css3-techniques-you-should-know/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>10 useful .htaccess snippets to have in your toolbox</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-useful-htaccess-snippets-to-have-in-your-toolbox/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-useful-htaccess-snippets-to-have-in-your-toolbox/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 23:57:35 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[css tricks]]></category>
		<category><![CDATA[custom error]]></category>
		<category><![CDATA[example urls]]></category>
		<category><![CDATA[jpe]]></category>
		<category><![CDATA[mysite com]]></category>
		<category><![CDATA[png images]]></category>
		<category><![CDATA[rewriterule]]></category>
		<category><![CDATA[www prefix]]></category>
		<category><![CDATA[www version]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-useful-htaccess-snippets-to-have-in-your-toolbox/</guid>
		<description><![CDATA[Before editing your .htaccess file, always make a backup so you can restore it if needed. Remove www in url For SEO reasons, you might always remove (or use) the www prefix in your urls. The following snippet will remove the www from your website url and redirect any url with the www to the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Before editing your .htaccess file, always make a backup so you can restore it if needed.</strong></p>
<h2>Remove www in url</h2>
<p>For SEO reasons, you might always remove (or use) the <em>www</em> prefix in your urls. The following snippet will remove the <em>www</em> from your website url and redirect any url with the <em>www</em> to the non-www version.</p>
<pre>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^your-site.com$ [NC]
RewriteRule ^(.*)$ http://your-site.com/$1 [L,R=301]
</pre>
<p><strong>Source: <a href="http://css-tricks.com/snippets/htaccess/www-no-www/">http://css-tricks.com/snippets/htaccess/www-no-www/</a></strong></p>
<h2>Prevent hotlinking</h2>
<p>Hotlinking is a bad practice that consist of using the images from another site on yours. When you&#8217;re hotlinked by someone else, your bandwidth is used for someone else profit. Of course, you may want to prevent hotlinkers. Just add the following snippet to your <code>.htaccess</code> file after replacing the example urls by your own urls.</p>
<pre>
RewriteEngine On
#Replace ?mysite\.com/ with your blog url
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
#Replace /images/nohotlink.jpg with your &quot;don&#039;t hotlink&quot; image url
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpg [L]
</pre>
<p><strong>Source: <a href="http://www.catswhocode.com/blog"></a></strong></p>
<h2>Redirect all WordPress feeds to feedburner</h2>
<p>Most bloggers are using Feedburner, a web service that lets you know how many people are reading your blog via feeds. If you&#8217;re using WordPress, you should redirect all WordPress feeds (rss, atom, etc) to your feedburner feed. Modify lines 2 and 3, and  then paste this code to your <code>.htaccess</code> file.</p>
<pre>
&lt;IfModule mod_alias.c&gt;
 RedirectMatch 301 /feed/(atom|rdf|rss|rss2)/?$ http://feedburner.com/yourfeed/
 RedirectMatch 301 /comments/feed/(atom|rdf|rss|rss2)/?$ http://feedburner.com/yourfeed/
&lt;/IfModule&gt;
</pre>
<p><strong>Source: <a href="http://www.wprecipes.com/how-to-redirect-wordpress-rss-feeds-to-feedburner-with-htaccess">http://www.wprecipes.com/how-to-redirect-wordpress-rss-feeds-to-feedburner-with-htaccess</a></strong></p>
<h2>Create custom error pages</h2>
<p>Tired of the old errors pages of your site? Just create some html files with the look you want, upload them to your server, and add the following to your <code>.htaccess</code> file:</p>
<pre>
ErrorDocument 400 /errors/badrequest.html
ErrorDocument 401 /errors/authreqd.html
ErrorDocument 403 /errors/forbid.html
ErrorDocument 404 /errors/notfound.html
ErrorDocument 500 /errors/serverr.html
</pre>
<p><strong>Source: <a href="http://css-tricks.com/snippets/htaccess/custom-error-pages/">http://css-tricks.com/snippets/htaccess/custom-error-pages/</a></strong></p>
<h2>Force download of specific files</h2>
<p>When offering some files such as mp3s, eps or xls, for download on your site, you may force download instead of letting the browser decide what to do.<br /> This snippet will force the download of <code>.xls</code> and <code>.eps</code> files from your server.</p>
<pre>
&lt;Files *.xls&gt;
  ForceType application/octet-stream
  Header set Content-Disposition attachment
&lt;/Files&gt;
&lt;Files *.eps&gt;
  ForceType application/octet-stream
  Header set Content-Disposition attachment
&lt;/Files&gt;
</pre>
<p><strong>Source: <a href="http://www.givegoodweb.com/post/30/forcing-a-download-with-apache-and-htaccess">http://www.givegoodweb.com/post/30/forcing-a-download-with-apache-and-htaccess</a></strong></p>
<h2>Log PHP errors</h2>
<p>This snippet is an interesting way to log errors from your php file into a log file. Just create a php_error.log file somewhere on your server, and add the snippet to your .htaccess file. Don&#8217;t forget to modify the log file location on line 7.</p>
<pre>
# display no errs to user
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
# log to file
php_flag log_errors on
php_value error_log /location/to/php_error.log
</pre>
<p><strong>Source: <a href="http://css-tricks.com/snippets/htaccess/php-error-logging/">http://css-tricks.com/snippets/htaccess/php-error-logging/</a></strong></p>
<h2>Remove file extensions from urls</h2>
<p>File extensions may be useful to developers, but there&#8217;s absolutely no need for your site visitors to be able to see them. This snippet will remove the <code>.html</code> extension on any <code>html</code> files. Of course, this code can be easily adapted to remove extensions from other file extensions such as php.</p>
<pre>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
# Replace html with your file extension, eg: php, htm, asp
</pre>
<p><strong>Source: <a href="http://eisabainyo.net/weblog/2007/08/19/removing-file-extension-via-htaccess/">http://eisabainyo.net/weblog/2007/08/19/removing-file-extension-via-htaccess</a></strong></p>
<h2>Prevent directory listing</h2>
<p>On your web server, when a directory do not have an index file, Apache automatically create a list of all files from the current directory. If you do not wish that anyone can see which files are on your server, just add the following code to your <code>.htaccess</code> file to prevent automatic directory listing.</p>
<pre>
Options -Indexes
</pre>
<h2>Reduce pages weight by compressing static data</h2>
<p>Do you know that it is possible to send compressed data to the visitors, which will be decompressed by the client? This code will definitely save you (and your visitor) bandwidth and reduce your pages weight.</p>
<pre>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
</pre>
<h2>Automatically add utf-8 charset to files</h2>
<p>In order to avoid encoding problems, you can force a specific encoding directly on your .htaccess file. That way, you&#8217;ll ensure that your html documents will always render correctly, even if your forget to add a <code>&lt;meta http-equiv="Content-Type"&gt;</code> directive on your html pages.</p>
<pre>
&lt;FilesMatch &quot;\.(htm|html|css|js)$&quot;&gt;
AddDefaultCharset UTF-8
&lt;/FilesMatch&gt;
</pre>
<p><strong>Source: <a href="http://www.askapache.com/htaccess/setting-charset-in-htaccess.html">http://www.askapache.com/htaccess/setting-charset-in-htaccess.html</a></strong></p>
<p> <img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/344b4_9yCkmE1Eqjw" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/Catswhocode">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-useful-htaccess-snippets-to-have-in-your-toolbox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to create offline HTML5 web apps in 5 easy steps</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/how-to-create-offline-html5-web-apps-in-5-easy-steps/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/how-to-create-offline-html5-web-apps-in-5-easy-steps/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 23:57:26 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[cache index]]></category>
		<category><![CDATA[css image]]></category>
		<category><![CDATA[doctype html]]></category>
		<category><![CDATA[fallback]]></category>
		<category><![CDATA[image jpg]]></category>
		<category><![CDATA[media queries]]></category>
		<category><![CDATA[network search]]></category>
		<category><![CDATA[style css]]></category>
		<category><![CDATA[web apps]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/how-to-create-offline-html5-web-apps-in-5-easy-steps/</guid>
		<description><![CDATA[Getting started View Demo Download files 1 &#8211; Add HTML5 doctype The first thing to do is create a valid HTML5 document. The HTML5 doctype is easier to remember than ones used for xhtml: &#60;!DOCTYPE html&#62; &#60;html&#62; ... Create a file named index.html, or get the example files from my CSS3 media queries article to [...]]]></description>
			<content:encoded><![CDATA[<h2>Getting started</h2>
<ul>
<li><a href="http://www.catswhocode.com/demos/html5-offline-cache/">View Demo</a></li>
<li><a href="http://www.catswhocode.com/blog/wp-content/uploads/2011/05/html5-offline-cache.zip">Download files</a></li>
</ul>
<h2>1 &#8211; Add HTML5 doctype</h2>
<p>The first thing to do is create a valid HTML5 document. The HTML5 doctype is easier to remember than ones used for xhtml:</p>
<pre>
&lt;!DOCTYPE html&gt;
&lt;html&gt;
  ...
</pre>
<p>Create a file named <code>index.html</code>, or get the example files from my <a href="http://www.catswhocode.com/blog/create-an-adaptable-website-layout-with-css3-media-queries">CSS3 media queries</a> article to use as a basis for this tutorial.<br /> In case you need it, the full HTML5 specs are available <a href="http://dev.w3.org/html5/spec/Overview.html">on the W3C website</a>.</p>
<h2>2 &#8211; Add .htaccess support</h2>
<p>The file we&#8217;re going to create to cache our web page is called a <code>manifest</code> file. Before creating it, we first have to add a directive to the <code>.htaccess</code> file (assuming your server is Apache).</p>
<p>Open the <code>.htaccess</code> file, which is located on your website root, and add the following code:</p>
<pre>
AddType text/cache-manifest .manifest
</pre>
<p>This directive makes sure that every <code>.manifest</code> file is served as text/cache-manifest. If the file isn&#8217;t, then the whole manifest will have no effect and the page will not be available offline.</p>
<h2>3 &#8211; Create the manifest file</h2>
<p>Now, things are going to be more interesting as we create a <code>manifest</code> file. Create a new file and save it as <code>offline.manifest</code>. Then, paste the following code in it. I&#8217;ll explain it later.</p>
<pre>
CACHE MANIFEST
#This is a comment

CACHE
index.html
style.css
image.jpg
image-med.jpg
image-small.jpg
notre-dame.jpg
</pre>
<p>Right now, you have a perfectly working <code>manifest</code> file. The way it works is very simple: After the <code>CACHE</code> declaration, you have to list each files you want to make available offline. That&#8217;s enough for caching a simple web page like the one from my example, but HTML5 caching has other interesting possibilities.</p>
<p>For example, consider the following <code>manifest</code> file:</p>
<pre>
CACHE MANIFEST
#This is a comment

CACHE
index.html
style.css

NETWORK:
search.php
login.php

FALLBACK:
/api offline.html
</pre>
<p>Like in the example <code>manifest</code> file, we have a <code>CACHE</code> declaration that caches index.html and style.css. But we also have the <code>NETWORK</code> declaration, which is used to specify files that shouldn&#8217;t be cached, such as a login page.</p>
<p>The last declaration is <code>FALLBACK</code>. This declaration allows you to redirect the user to a particular file (in this example, <code>offline.html</code>) if a resource (/api) isn&#8217;t available offline.</p>
<h2>4 &#8211; Link your manifest file to the html document</h2>
<p>Now, both your <code>manifest</code> file and your main html document are ready. The only thing you still have to do is to link the <code>manifest</code> file to the html document.</p>
<p>Doing this is easy: simply add the <code>manifest</code> attribute to the <code>html</code> element as shown below:</p>
<pre>
&lt;html manifest=&quot;/offline.manifest&quot;&gt;
</pre>
<h2>5 &#8211; Test it</h2>
<p>Once done, you&#8217;re ready to go. If you visit your <code>index.html</code> file with Firefox 3.5+, you should see a banner like this one:<br /> <img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/37dce_firefox_offline.png" alt="" /></p>
<p>Other browser I&#8217;ve tested (Chrome, Safari, Android and iPhone) do not warn about the file caching, and the file is automatically cached.</p>
<p>Below you&#8217;ll find the browser compatibility of this technique: As usual Internet Explorer does not support it.</p>
<ul>
<li>IE: No support</li>
<li>Firefox: 3.5+</li>
<li>Safari: 4.0+</li>
<li>Chrome: 5.0+</li>
<li>Opera: 10.6+</li>
<li>iPhone: 2.1+</li>
<li>Android: 2.0+</li>
</ul>
<p> <img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/37dce_at9YW_JIpJc" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/Catswhocode">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/how-to-create-offline-html5-web-apps-in-5-easy-steps/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>10 tips for creating high quality WordPress themes</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-tips-for-creating-high-quality-wordpress-themes/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-tips-for-creating-high-quality-wordpress-themes/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 23:56:56 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Althought]]></category>
		<category><![CDATA[consistent style]]></category>
		<category><![CDATA[css standards]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[open source projects]]></category>
		<category><![CDATA[php tags]]></category>
		<category><![CDATA[style convention]]></category>
		<category><![CDATA[valid html]]></category>
		<category><![CDATA[w3c html]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-tips-for-creating-high-quality-wordpress-themes/</guid>
		<description><![CDATA[Respect HTML and CSS standards This statement may sound pretty obvious, but actually many publicly available themes don&#8217;t pass W3C HTML or CSS validation. When building a theme, it is important to respect HTML and CSS standards so your code will be clean and (mostly) cross-browser compatible. A valid HTML/CSS theme is also a proof [...]]]></description>
			<content:encoded><![CDATA[<h2>Respect HTML and CSS standards</h2>
<p>This statement may sound pretty obvious, but actually many publicly available themes don&#8217;t pass W3C HTML or CSS validation. When building a theme, it is important to respect HTML and CSS standards so your code will be clean and (mostly) cross-browser compatible. A valid HTML/CSS theme is also a proof of quality development.</p>
<p>HTML, XHTML and HTML5 code can be checked on the<a href="http://validator.w3.org/">W3C website</a>. The W3C also have a free <a href="http://jigsaw.w3.org/css-validator/">tool to check your CSS coding</a>, althought with the rise of CSS3 and its vendor prefixes, it is pretty hard to obtain a 100% valid stylesheet.</p>
<h2>Respect WordPress coding standards</h2>
<p>Like most other open-source projects, WordPress have its own list of coding standards. This meticulous coding style convention is here to keep harmony among the thousands of themes and plugins availables and maintain a consistent style so the code can become clean and easy to read at a glance.</p>
<p>For example, the coding convention forbids to use PHP shorthand tag:</p>
<pre>
&lt;? ... ?&gt;
&lt;?=$var?&gt;
</pre>
<p>Instead, use full PHP tags:</p>
<pre>
&lt;?php $var; ?&gt;
</pre>
<p>The complete coding standard guide can be read on <a href="http://codex.wordpress.org/WordPress_Coding_Standards">WordPress codex</a>. On a personnal note, I really think that WordPress should recommend coding CSS in &#8220;blocks&#8221; instead of &#8220;lines&#8221;.</p>
<h2>Don&#8217;t forget wp_head()</h2>
<p>Within the <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags of most WordPress themes, you&#8217;ll find a function named <code>wp_head()</code>. This function may look useless to newcommers, but it is extremely important: Many plugins use this function to &#8220;hook&#8221; code in WordPress header. Without this function within your <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags, lots of plugins will not be able to work.</p>
<p>A similar function named <code>wp_footer();</code> can be found in the <code>footer.php</code> file of most themes. Don&#8217;t forget it as well, it is used by plugins to hook code in your theme footer. For example, analytics.</p>
<h2>Be careful when including hacks</h2>
<p>Do you know my blog <a href="http://www.wprecipes.com">WPRecipes</a>? In case you don&#8217;t, it is a place where I share WordPress hacks and code snippets. The site is quite popular among the community and I&#8217;m happy that many people seems to enjoy my hacks.</p>
<p>But last year, Gravity Forms developer Carl Hancock let me know that one of my hacks (Named <a href="http://www.wprecipes.com/disable-wordpress-automatic-formatting-on-posts-using-a-shortcode">Disable WordPress automatic formatting on posts using a shortcode</a>) was intensively used on themes sold at <a href="http://www.themeforest.net/?ref=jbj">Themeforest</a>, and caused conflicts with Gravity Forms.</p>
<p>Of course, I felt sorry for the countless hours Carl and his team wasted in support due to the conflict between their plugin, and my hack. This is why hacks may be used on your own theme, or on a client theme, but <strong>you should not include hacks in a theme you&#8217;re going to distribute, excepted if you know exactly what you&#8217;re doing</strong>.</p>
<h2>Start from something solid</h2>
<p>In order to save time, most developers prefer starting coding from an existing theme. For example, I&#8217;ve used Cris Coyier&#8217;s <a href="http://digwp.com/2010/02/blank-wordpress-theme/">Blank Theme</a> as the starting point of most of the themes I&#8217;ve created in 2010 and 2011.</p>
<p>But don&#8217;t start from a finished plugin. I&#8217;ve seen themes coded over WooThemes and then re-released. Let me tell you, the code was an absolute nightmare!</p>
<p>If you&#8217;re looking for a rock solid basis to create your theme, give a go to <a href="http://constellationtheme.com/">Constellation</a>: It is a &#8220;blank&#8221; HTML5/CSS3 theme, which the current CatsWhoCode theme derives from.</p>
<h2>Use localized strings</h2>
<p>When coding a WordPress theme or plugin, you have to think about those that doesn&#8217;t speak English. Using the PHP language, two very useful functions are available for you to create a translatable theme or plugin:</p>
<p>The first is the function <code>_e()</code>, which prints on screen the desired text, translated into the user language:</p>
<pre>_e("Text to translate", "textdomain");</pre>
<p>The second is <code>__() </code>wich is basically the same than <code>_e()</code>, but returns the text:</p>
<pre>function say_something() {
    return __("Text to translate", "textdomain");
}</pre>
<p>By using those functions, you make your work translatable in any language, which is a very great thing for people that blog in another language than English. Don&#8217;t forget to read my guide about making <a href="http://www.catswhocode.com/blog/easily-create-multilingual-sites-with-wordpress">multilingual WordPress themes</a> if you want to know more about the topic.</p>
<h2>Prefix your php functions</h2>
<p>It may looks like a detail at first, but prefixing your php functions is always a good practice. Why? Because most people would name their functions using common names such as <em>display_stuff()</em>. And if a theme developer named one of his functions with the same name that a function from a plugin the end user is using&#8230; Boom, the site is broken, and the user is not happy.</p>
<p>A bad example is to name your functions like this:</p>
<pre>
function display_stuff($stuff){
...
}
</pre>
<p>Instead, add a prefix such as your initials:</p>
<pre>
function cwc_display_stuff($stuff){
...
}
</pre>
<p>It do not require a big effort and it can avoid big problems for the non tech-savvy user.</p>
<h2>Test content formating</h2>
<p>A blog is used to display content. Then, why so many available themes do not comes with a style for HTML lists or blockquotes? To make sure users will be happy with your theme, you should make sure that all HTML elements looks good.</p>
<p>To do so, you can use a plugin named <a href="http://wordpress.org/extend/plugins/wp-dummy-content/">WP Dummy Content</a>, which allow you to create posts, pages, categories and more so you can check how good you theme looks when it&#8217;s full of content.</p>
<p>Another tool to have in your tool box is the <a href="http://thinkdesignblog.com/wordpress-lorem-ipsum-test-post-pack.htm">WP Lorem Ipsum Post Pack</a>, a XML file that contains categories, sub-categories, pages, sub-pages, 30 test posts, tags, thumbnails via custom fields, and a &#8220;Testing the Elements&#8221; post so that you can test html elements, such as <code>&lt;h2&gt;</code>, <code>&lt;blockquote&gt;</code>, so you can test your theme in depth. Importing this XML is easy: Login to your dashboard, navigate to Tools &rarr; Import, and select the file.</p>
<h2>Make sure your theme supports the latests functions</h2>
<p>Do you think your theme is ready for public distribution? If yes, you should always make a final checking using the <a href="http://wordpress.org/extend/plugins/theme-check">Theme-Check plugin</a>, which is an easy way to test your theme and make sure it&#8217;s up to spec with the latest theme review standards.</p>
<p><a href="http://wordpress.org/extend/plugins/theme-check">Theme Check</a> can be installed as any other plugins, and will let you know about any coding mistakes such as the use of a deprecated function.</p>
<h2>Release your theme as GPL</h2>
<p>With the success of WordPress, people created companies and started to sell &#8220;premium&#8221; themes. Most of them with released under the terms of the GPL licence, but several theme vendors chose to go with a licence that may, in their opinion, give them a better protection against piracy.</p>
<p>Though, WordPress team stated numerous times that themes <a href="http://wordpress.org/news/2009/07/themes-are-gpl-too/">have to be GPL compliant</a>.</p>
<p>Although I am not a GPL fanatic, most WordPress users are, and trying to release a theme that is not GPL compliant will make you a pariah, and might even get you a lawsuit. So, don&#8217;t do something stupid: Respect WordPress licence, or choose another platform to work on.</p>
<p><em>Any other useful tip? Feel free to share it in a comment!</em></p>
<p> <img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/cc2e2_7KbR_UaNqmA" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/Catswhocode">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-tips-for-creating-high-quality-wordpress-themes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>10+ useful tools to simplify CSS3 development</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-useful-tools-to-simplify-css3-development/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-useful-tools-to-simplify-css3-development/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 23:56:45 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[button design]]></category>
		<category><![CDATA[css code]]></category>
		<category><![CDATA[css file]]></category>
		<category><![CDATA[drop shadow]]></category>
		<category><![CDATA[inline css]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[photoshop effects]]></category>
		<category><![CDATA[text shadow]]></category>
		<category><![CDATA[true time]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-useful-tools-to-simplify-css3-development/</guid>
		<description><![CDATA[CSS3 Pie Are you surprised that Internet Explorer 6/8 CSS3 support is almost non existent? I guess most of you aren&#8217;t. Unfortunately, some clients may want you to create a website that look like in a modern browser in IE. This is when CSS3 Pie is useful: It allows you to use most of the [...]]]></description>
			<content:encoded><![CDATA[<h2>CSS3 Pie</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/6bc13_css3-tools-1.png" alt="" /><br /> Are you surprised that Internet Explorer 6/8 CSS3 support is almost non existent? I guess most of you aren&#8217;t. Unfortunately, some clients may want you to create a website that look like in a modern browser in IE. This is when CSS3 Pie is useful: It allows you to use most of the CSS3 cool features on IE.<br /> <strong>&rarr; Visit <a href="http://css3pie.com/">CSS3 Pie</a></strong></p>
<h2>CSS3 Builder</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/6bc13_css3-tools-11.png" alt="" /><br /> With this tool, you can design complex CSS3 boxes using an interface looking exactly like the one used for applying Photoshop effects. Definitely a great tool to save lots of time.<br /> <strong>&rarr; Visit <a href="http://www.layerstyles.org/builder.html">CSS3 Builder</a></strong></p>
<h2>CSS3 Drop shadow generator</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/d705d_css3-tools-12.png" alt="" /><br /> This one is quite similar to CSS3 builder, just use the sliders to visually design your drop shadow. Once done, just copy the CSS code which have been automatically created. Paste it to your css file, and you&#8217;re ready to go!<br /> <strong>&rarr; Visit <a href="http://www.wordpressthemeshock.com/css-drop-shadow/">CSS3 Drop shadow generator</a></strong></p>
<h2>Cascader</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/d705d_css3-tools-2.png" alt="" /><br /> This tool isn&#8217;t CSS3 specific, but it is so useful that it would have been a shame not to include it on that list. Cascader lets you input some HTML code and it will detect all inline CSS, remove it from the HTML and add it to a separate stylesheet. A true time saver for those looking for clean HTML.<br /> <strong>&rarr; Visit <a href="http://www.cascader.co/">Cascader</a></strong></p>
<h2>Border Radius.com</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/d705d_css3-tools-3.png" alt="" /><br /> <code>border-radius</code> is one of the most popular CSS3 properties. Those who remember how boring it was to create boxes with rounded corners using images certainly know why. This tool allow you to quickly create a box and get the appropriate CSS3 code.<br /> <strong>&rarr; Visit <a href="http://border-radius.com/">Border Radius.com</a></strong></p>
<h2>Button Maker</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/4e084_css3-tools-4.png" alt="" /><br /> CSS3 allows you to create <a href="http://www.catswhocode.com/blog/top-10-css3-buttons-tutorials">awesome buttons</a>. This tool, created by Chris Coyier, makes CSS3 button design extremely easy: Just pick colors, adjust radius, and get the code, ready to be pasted into your CSS file.<br /> <strong>&rarr; Visit <a href="http://css-tricks.com/examples/ButtonMaker/">Button Maker</a></strong></p>
<h2>CSS3 Generator</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/4e084_css3-tools-5.png" alt="" /><br /> Need help with CSS3 declarations? This very handy generator helps you create declarations for most popular CSS3 properties: @font-face, RGBA, text-shadow, border-radius, and more.<br /> <strong>&rarr; Visit <a href="http://css3generator.com/">CSS3 Generator</a></strong></p>
<h2>Modernizr</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/c4e97_css3-tools-6.png" alt="" /><br /> Modernizr is a small script that detect support for CSS3 and adds classes to the <code>&lt;html&gt;</code> element which allow you to target specific browser functionality in your stylesheet. For example, if the browser does not support the multiple backgrounds functionality, a <code>no-multiplebgs</code> class will be added to the <code>&lt;html&gt;</code> element. then it will be pretty easy for you to fall back.<br /> <strong>&rarr; Visit <a href="http://www.modernizr.com/">Modernizr</a></strong></p>
<h2>HTML5 &#038; CSS3 Support</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/141ca_css3-tools-7.png" alt="" /><br /> Need to know if Internet Explorer 8 supports the <code>text-shadow</code> property? Just have a look to this very useful chart, which reveals CSS3 support for all major browsers. Definitely a page to have in your bookmarks!<br /> <strong>&rarr; Visit <a href="http://www.findmebyip.com/litmus/#target-selector">HTML5 &#038; CSS3 Support</a></strong></p>
<h2>CSS3 Gradient Generator</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/a91d8_css3-tools-8.png" alt="" /><br /> As you can guess, this tool is a gradient generator. Just pick your colors using the picker, preview it in the preview area, and grab your ready-to-be-pasted code. It&#8217;s easy as that!<br /> <strong>&rarr; Visit <a href="http://gradients.glrzad.com/">CSS3 Gradient Generator</a></strong></p>
<h2>CSS3 Please</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/3683d_css3-tools-9.png" alt="" /><br /> CSS3 Please is another very helpful site which allow you to copy and paste most common CSS3 declarations. It also has a preview area so you can live test your declarations.<br /> <strong>&rarr; Visit <a href="http://css3please.com/">CSS3 Please</a></strong></p>
<h2>CSS3 Cheat Sheet</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/3683d_css3-tools-10.png" alt="" /><br /> When coding, cheat sheets are very helpful to quickly remember properties and their syntax. Smashing Magazine has created this CSS3 cheat sheet that you can download and print. A preview version in .gif format is also available <a href="http://media.smashingmagazine.com/wp-content/uploads/images/css3-cheat-sheet/preview.gif">here</a>.<br /> <strong>&rarr; Visit <a href="http://www.smashingmagazine.com/2009/07/13/css-3-cheat-sheet-pdf/">CSS3 Cheat Sheet</a></strong></p>
<p> <img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/3683d_cuXErQwzHuA" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/Catswhocode">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-useful-tools-to-simplify-css3-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create an adaptable website layout with CSS3 media queries</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/create-an-adaptable-website-layout-with-css3-media-queries/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/create-an-adaptable-website-layout-with-css3-media-queries/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 23:56:26 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[code lt]]></category>
		<category><![CDATA[div id]]></category>
		<category><![CDATA[doctype html]]></category>
		<category><![CDATA[html lang]]></category>
		<category><![CDATA[lorem ipsum]]></category>
		<category><![CDATA[mauris]]></category>
		<category><![CDATA[media queries]]></category>
		<category><![CDATA[meta charset]]></category>
		<category><![CDATA[quot quot]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/create-an-adaptable-website-layout-with-css3-media-queries/</guid>
		<description><![CDATA[Getting started View demo (Horizontally resize your browser to view it in action) Download files Creating the default layout The first step of this tutorial is obviously to create a HTML page. I chose to make a simple HTML5 page with only a header image, a title, and some text. Copy the following code and [...]]]></description>
			<content:encoded><![CDATA[<h2>Getting started</h2>
<ul>
<li><a href="http://www.catswhocode.com/demos/css3-media-queries/">View demo</a> (Horizontally resize your browser to view it in action)</li>
<li><a href="http://www.catswhocode.com/blog/wp-content/uploads/2011/05/css3-media-queries.zip">Download files</a></li>
</ul>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e7f73_css3-media-queries.jpg" alt="" /></p>
<h2>Creating the default layout</h2>
<p>The first step of this tutorial is obviously to create a HTML page. I chose to make a simple HTML5 page with only a header image, a title, and some text. Copy the following code and paste it into a file named <code>index.html</code>.</p>
<pre>
&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;

&lt;head&gt;
	&lt;meta charset=&quot;utf-8&quot;&gt;
   	&lt;title&gt;Cats Who Code demo&lt;/title&gt;
	&lt;link href=&quot;style.css&quot; type=&quot;text/css&quot; rel=&quot;stylesheet&quot; media=&quot;screen&quot;&gt;
	&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width; initial-scale=1.0; maximum-scale=1.0;&quot;&gt;
&lt;/head&gt;

&lt;body&gt;
	&lt;div id=&quot;container&quot;&gt;
		&lt;header class=&quot;ma-class-en-css&quot;&gt;
			&lt;h1 id =&quot;logo&quot;&gt;&lt;a href=&quot;#&quot;&gt;Cats Who Code&lt;/a&gt;&lt;/h1&gt;
		&lt;/header&gt;

		&lt;div id=&quot;content&quot;&gt;
       		&lt;h2&gt;Paris, France&lt;/h2&gt;
        	&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce a ligula massa. Donec consequat, risus nec viverra condimentum, elit velit dignissim dui, id congue sapien leo tincidunt est. Mauris consectetur tempus lorem id aliquet. Proin eu faucibus massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In magna ligula, ornare sed posuere faucibus, consequat ac lacus. Fusce sodales fermentum nibh, a imperdiet nisi bibendum eget. Donec gravida iaculis sapien eu consectetur. Curabitur id augue augue. Nam mauris urna, suscipit eget faucibus sit amet, mollis vitae felis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris ipsum lectus, imperdiet id aliquam nec, vulputate vitae mauris. Integer gravida, neque eu placerat egestas, urna metus bibendum nisl, quis congue felis velit id diam. Quisque non tortor at turpis facilisis placerat quis sed felis. Ut eget ipsum dolor, id lacinia leo. Vivamus vitae blandit libero. Integer ultricies gravida leo quis lobortis. Morbi ultrices risus vulputate magna dignissim sed ultricies arcu tristique. Sed non facilisis sapien.&lt;/p&gt;

			&lt;p&gt;Integer faucibus, augue vitae vulputate sodales, tellus tellus vulputate tortor, in iaculis ipsum orci vitae libero. Vestibulum laoreet accumsan erat vel pretium. Ut turpis elit, ultricies id accumsan non, condimentum feugiat neque. Nam ut erat urna, a porta augue. Donec vel porttitor magna. Cras eget tortor eget ante malesuada sodales sed a leo. Fusce sit amet cursus sem. Nulla aliquet accumsan ante sit amet condimentum. Morbi varius porta sapien nec iaculis. In gravida velit at nulla imperdiet varius.&lt;/p&gt;
        &lt;/div&gt;&lt;!-- #content --&gt;

		&lt;footer&gt;A demo by &lt;a href=&quot;http://www.catswhocode.com&quot;&gt;CatsWhoCode&lt;/a&gt;&lt;/footer&gt;
	&lt;/div&gt;&lt;!-- #container --&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Once done, we have to add a stylesheet to our <code>index.html</code> page. The following code is the basic styling for the page. Paste it into a file named <code>style.css</code>.</p>
<pre>
*{
	/* On a production site, use a real reset instead of this! */
	margin:0;
	padding:0;
}            

body{
	background:#f5f5f5;
	font-family:&quot;Lucida Grande&quot;, Arial;
	font-size:13px;
	line-height:21px;
	color:#444;
}     

p{
	margin:15px 0;
}              

h2{
	margin-top:20px;
}

#container{
	background:#fff;
	border-left:1px #ddd solid;
	border-right:1px #ddd solid;
	border-bottom:1px #ddd solid;
	width:600px;
	margin:0 auto;
}  

header h1#logo a{
	text-indent:-9999px;
	display:block;
	width:600px;
	height:82px;
	background:url(image-med.jpg) no-repeat 0 0;
}             

#content{
	width:95%;
	margin:0 auto;
}

footer{
	text-align:center;
	width:100%;
	display:block;
	font-size:11px;
}
</pre>
<p>Right now, if you look to your <code>index.html</code> page through your web browser, you&#8217;ll see something like the screenshot below. Nothing spectular, right? Keep reading, we&#8217;re going to dive into the interesting part.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/e7f73_css3-adaptable-layout-1.png" alt="" /></p>
<h2>Using CSS3 media queries to make our layout fit in all screen resolutions</h2>
<p>If you had a look to your <code>index.html</code> page with a screen resolution bigger than 800*600, you might find the layout is really small. So, what about allowing large screens to display a bigger version, while still using the small version for people with lower resolutions?</p>
<p>This is what CSS3 media queries can do for you. Open your <code>style.css</code> file and paste the code below at the end of the file:</p>
<pre>
@media screen and (min-width:1200px){
	#container{
		width:1100px;
	}  

	header h1#logo a{
		width:1100px;
		height:150px;
		background:url(image.jpg) no-repeat 0 0;
	}                          

}
</pre>
<p>Now, have a look at <code>index.html</code> again: The layout is indeed bigger. Horizontally resize the window size&#8230; The site switches back to the small layout. How great is that?</p>
<p>As you can see, there&#8217;s nothing complicated at all in implementing this technique. <code>@media screen</code> tells the browser this applies only for screens, because we don&#8217;t want to resize anything for print. And <code>and (min-width:1200px)</code> specifies that the screen must have a 1200px minimum width. If these requirements are met, then the code within the parenthesis is taken into consideration by the browser, and redefines previous styles.</p>
<p>Now that we created a bigger version for bigger screens, what about a very small version for mobiles? Paste this code into <code>style.css</code> and you&#8217;re done.</p>
<pre>
@media screen and (max-width:767px){
	#container{
		width:320px;
	} 

	header h1#logo a{
		width:320px;
		height:44px;
		background:url(image-small.jpg) no-repeat 0 0;
	}                           

}
</pre>
<h2>Dealing with images</h2>
<p>Images always play an important part of a website. So, let&#8217;s add an image to our website layout. Re-open <code>index.html</code> and insert the following code just before the first closing <code>&lt;/p&gt;</code></p>
<pre>
&lt;img src="notre-dame.jpg" alt="Photo by Wlappe"&gt;
</pre>
<p>If you have a look to <code>index.html</code> with a big screen, no problem. But if you resize the window horizontally&#8230;ouch.</p>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/b5ecc_css3-adaptable-layout-2.png" alt="" /></p>
<p>The solution to that problem is quite simple: As we resize the website layout, we have to resize images as well. The <code>max-width</code> CSS property is here to help.</p>
<p>Insert the following on your <code>style.css</code> file:</p>
<pre>
img {
	max-width:570px;
	margin:10px 0;
}
</pre>
<p>A default image size is now defined. Now we can setup sizes for big screens as well as mobile devices:</p>
<pre>
@media screen and (min-width:1200px){
	img {
		max-width:1000px;
	}
}

@media screen and (max-width:767px){
	img {
    	max-width:305px;
	}
}
</pre>
<p>Now, resize your browser: Images are resized with the layout!</p>
<h2>Limitations</h2>
<p>Guess what? Internet Explorer (excepted the newly released IE9) doesn&#8217;t know anything about the CSS <code>@media</code> property. Which means that even on a big screen, IE users will see the default layout.</p>
<p>Hope you enjoyed this tutorial. Have a great day!</p>
<p> <img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/04736_BpKFMPOK6UY" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/Catswhocode">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/create-an-adaptable-website-layout-with-css3-media-queries/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to create an online radio using jQuery and jPlayer</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/how-to-create-an-online-radio-using-jquery-and-jplayer/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/how-to-create-an-online-radio-using-jquery-and-jplayer/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 23:56:00 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[auto increment]]></category>
		<category><![CDATA[demo html]]></category>
		<category><![CDATA[html xmlns]]></category>
		<category><![CDATA[key song]]></category>
		<category><![CDATA[mp3 one]]></category>
		<category><![CDATA[song id]]></category>
		<category><![CDATA[sql code]]></category>
		<category><![CDATA[table songs]]></category>
		<category><![CDATA[transitional dtd]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/how-to-create-an-online-radio-using-jquery-and-jplayer/</guid>
		<description><![CDATA[Getting started View demo Read jPlayer documentation Download files Creating the database First, create a new SQL database. Let&#8217;s call it radio. Once done, we have to create a table. We only need 4 fields: An id, the mp3 url, the artist name and the song title. Here is the SQL code to use in [...]]]></description>
			<content:encoded><![CDATA[<h2>Getting started</h2>
<ul>
<li><a href="http://phpsnippets.info/test/demo.htm">View demo</a></li>
<li><a href="http://jplayer.org/latest/developer-guide">Read jPlayer documentation</a></li>
<li><a href="http://www.catswhocode.com/blog/wp-content/uploads/2011/05/cwc-radio-player.zip">Download files</a></li>
</ul>
<h2>Creating the database</h2>
<p>First, create a new SQL database. Let&#8217;s call it <code>radio</code>. Once done, we have to create a table. We only need 4 fields: An id, the mp3 url, the artist name and the song title. Here is the SQL code to use in order to create the table named <code>songs</code>:</p>
<pre>
CREATE TABLE `songs` (
  `song_id` int(11) NOT NULL AUTO_INCREMENT,
  `url` varchar(500) NOT NULL,
  `artist` varchar(250) NOT NULL,
  `title` varchar(250) NOT NULL,
  PRIMARY KEY (`song_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
</pre>
<p>We now have a database and a table to store basic information about songs we&#8217;re going to play on our radio. Now we have to populate the table. Choose some mp3 files and insert the following statement into your database:</p>
<pre>
INSERT INTO `songs` (`song_id`, `url`, `artist`, `title`) VALUES ('', 'http://mysongs.com/songurl.mp3', 'Artist name', 'Song name');
INSERT INTO `songs` (`song_id`, `url`, `artist`, `title`) VALUES ('', 'http://mysongs.com/anothersongurl.mp3', 'Another artist', 'Another song');
INSERT INTO `songs` (`song_id`, `url`, `artist`, `title`) VALUES ('', 'http://mysongs.com/onemoresongurl.mp3', 'One more artist', 'One more song');
</pre>
<p>Right now, the database is ready.</p>
<h2>Creating the HTML</h2>
<p>Of course, we have to create a HTML page. First, grab your copy of <a href="http://jplayer.org/">jPlayer</a>, the jQuery plugin we&#8217;re going to use to create the online radio. Unzip the file, then upload the <code>js/</code> and <code>skin/</code> to your server.</p>
<p>Then, create a file named <code>demo.html</code> on your server and insert the following code into it:</p>
<pre>
&lt;!DOCTYPE html PUBLIC &#039;-//W3C//DTD XHTML 1.0 Transitional//EN&#039; &#039;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#039;&gt;
&lt;html xmlns=&#039;http://www.w3.org/1999/xhtml&#039; lang=&#039;en&#039; xml:lang=&#039;en&#039;&gt;
&lt;head&gt;
	&lt;title&gt;Online radio using jQuery&lt;/title&gt;
	&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&gt;

	&lt;link href=&quot;skin/jplayer.blue.monday.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;

	&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js&quot;&gt;&lt;/script&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.jplayer.min.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
	&lt;div id=&quot;jquery_jplayer_1&quot; class=&quot;jp-jplayer&quot;&gt;&lt;/div&gt;
		&lt;div class=&quot;jp-audio&quot;&gt;
			&lt;div class=&quot;jp-type-single&quot;&gt;
		    	&lt;div id=&quot;jp_interface_1&quot; class=&quot;jp-interface&quot;&gt;
					&lt;ul class=&quot;jp-controls&quot;&gt;
						&lt;li&gt;&lt;a href=&quot;#&quot; class=&quot;jp-play&quot; tabindex=&quot;1&quot;&gt;play&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href=&quot;#&quot; class=&quot;jp-pause&quot; tabindex=&quot;1&quot;&gt;pause&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href=&quot;#&quot; class=&quot;jp-stop&quot; tabindex=&quot;1&quot;&gt;stop&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href=&quot;#&quot; class=&quot;jp-mute&quot; tabindex=&quot;1&quot;&gt;mute&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href=&quot;#&quot; class=&quot;jp-unmute&quot; tabindex=&quot;1&quot;&gt;unmute&lt;/a&gt;&lt;/li&gt;
					&lt;/ul&gt;

					&lt;div class=&quot;jp-progress&quot;&gt;
						&lt;div class=&quot;jp-seek-bar&quot;&gt;
							&lt;div class=&quot;jp-play-bar&quot;&gt;&lt;/div&gt;
						&lt;/div&gt;
					&lt;/div&gt;

					&lt;div class=&quot;jp-volume-bar&quot;&gt;
						&lt;div class=&quot;jp-volume-bar-value&quot;&gt;&lt;/div&gt;
					&lt;/div&gt;

					&lt;div class=&quot;jp-current-time&quot;&gt;&lt;/div&gt;
					&lt;div class=&quot;jp-duration&quot;&gt;&lt;/div&gt;
				&lt;/div&gt;

				&lt;div id=&quot;jp_playlist_1&quot; class=&quot;jp-playlist&quot;&gt;
					&lt;ul&gt;
						&lt;li&gt;&lt;strong id=&quot;artist&quot;&gt;Artist&lt;/strong&gt; - &lt;span id=&quot;songname&quot;&gt;Song name&lt;/span&gt;&lt;/li&gt;
					&lt;/ul&gt;
				&lt;/div&gt;
			&lt;/div&gt;
		&lt;/div&gt;
	&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</pre>
<p>This code has been taken from jPlayer&#8217;s demos. It is a simple html code that insert the necessary JavaScript files (jQuery + the jPlayer plugin) as well as the CSS and html used to display the music player. Right now, the player do not display correctly: We still have to use some jQuery to animate it. We&#8217;ll see that in a minute.</p>
<h2>Getting files from the database</h2>
<p>Now, we have to create a PHP file that will get a random song from the database, and display the file url as well as the artist and song name so we can grab it using Ajax. First, get your copy of <a href="http://justinvincent.com/ezsql">ezSQL</a> that I chose to use to manage my database queries. (Full ezSQl tutorial available <a href="http://www.catswhocode.com/blog/php-fast-and-easy-sql-queries-using-ezsql">here</a>) Unzip the files and upload <code>ez_sql_core.php</code> and <code>ez_sql_mysql.php</code> to the server.</p>
<p>Once done, create a file named <code>getsong.php</code> on the server. Paste the following code in it:</p>
<pre>
&lt;?php

if(!empty($_SERVER[&#039;HTTP_X_REQUESTED_WITH&#039;]) &amp;&amp; strtolower($_SERVER[&#039;HTTP_X_REQUESTED_WITH&#039;]) == &#039;xmlhttprequest&#039;){ 

	include_once &quot;ez_sql_core.php&quot;;
	include_once &quot;ez_sql_mysql.php&quot;;
	$db = new ezSQL_mysql(&#039;db_user&#039;,&#039;db_password&#039;,&#039;db_name&#039;,&#039;db_host&#039;); 

	$song = $db-&gt;get_row(&quot;SELECT * FROM songs ORDER BY RAND() LIMIT 1&quot;);

	$artist = $song-&gt;artist;
	$songname = $song-&gt;title;
	$url = $song-&gt;url;
	$separator = &#039;|&#039;;
	echo $url.$separator.$artist.$separator.$songname;
} 

?&gt;
</pre>
<p>Nothing complicated: I&#8217;ve included the ezSQL files needed, created a connection to the database, then requested one row from the <code>songs</code> table. The 3 values (File url, artist, and song name) are displayed on screen, separated by a pipe.</p>
<p>The conditional statement is used to detect Ajax requests and prevent people from being able to display songs url by simply typing <code>http://www.yousite.com/getsong.php</code> on their browser address bar.</p>
<h2>Making it work</h2>
<p>Alright, we&#8217;re almost done. What we need now is to use some jQuery to request a song using Ajax and our <code>getsong.php</code> file. Then, we&#8217;ll use jPlayer to play it.</p>
<p>Open your <code>demo.html</code> and paste the following after line 10:</p>
<pre>
&lt;script type=&quot;text/javascript&quot;&gt;
//&lt;![CDATA[

$(document).ready(function(){
	$(&quot;#jquery_jplayer_1&quot;).jPlayer({
		ready: function () {
			var data = $.ajax({
			  url: &quot;getsong.php&quot;,
			  async: false
			 }).responseText;

		    var string = data.split(&#039;|&#039;);
			$(this).jPlayer(&quot;setMedia&quot;, {
				mp3: string[0]
			}).jPlayer(&quot;play&quot;);

			$(&#039;#artist&#039;).html(string[1]);
			$(&#039;#songname&#039;).html(string[2]);
		},
		ended: function (event) {
			var data = $.ajax({
			  url: &quot;getsong.php&quot;,
			  async: false
			 }).responseText;

		    var string = data.split(&#039;|&#039;);
			$(this).jPlayer(&quot;setMedia&quot;, {
				mp3: string[0]
			}).jPlayer(&quot;play&quot;);

			$(&#039;#artist&#039;).html(string[1]);
			$(&#039;#songname&#039;).html(string[2]);
	    },
		swfPath: &quot;js&quot;,
		supplied: &quot;mp3&quot;
	});
});
//]]&gt;
&lt;/script&gt;
</pre>
<p>Now, if you save the file and point your browser to http://www.yoursite.com/demo.html, your radio should work: It gets a song from the database and play it. When the song&#8217;s over, another one is automatically selected.</p>
<p>There&#8217;s probably better ways to write this code (It has a lot of redundant code, which is always a bad practice) so don&#8217;t hesitate to write a comment if you have a better version to suggest.</p>
<h2>How to enhance the script</h2>
<p>While we have a working radio, it is very basic and can be enhanced: For example, we should exclude song already played (using songs ids stored in the database) or even better, create playlists. I haven&#8217;t worked on it yet, but if you are interested let me know in a comment and I might write a tutorial about it.</p>
<p> <img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/48787_ispvjqg83k0" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/Catswhocode">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/how-to-create-an-online-radio-using-jquery-and-jplayer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://mysongs.com/anothersongurl.mp3" length="1252" type="audio/mpeg" />
<enclosure url="http://mysongs.com/songurl.mp3" length="1252" type="audio/mpeg" />
<enclosure url="http://mysongs.com/onemoresongurl.mp3" length="1252" type="audio/mpeg" />
		</item>
		<item>
		<title>Top 10 CSS 3 forms tutorials</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/top-10-css-3-forms-tutorials/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/top-10-css-3-forms-tutorials/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 23:55:34 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[british web]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[elements]]></category>
		<category><![CDATA[nothing fancy]]></category>
		<category><![CDATA[search forms]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[spinners]]></category>
		<category><![CDATA[spooner]]></category>
		<category><![CDATA[web developer]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/top-10-css-3-forms-tutorials/</guid>
		<description><![CDATA[HTML5 &#038; CSS3 form HTML5 introduced useful new form elements as such as sliders, numeric spinners and date pickers. This tutorial will show you how to create a form with HTML5, and make it look really cool with CSS3. A great way to get started in both CSS3 and HTML5. &#187; View tutorial CSS3 form [...]]]></description>
			<content:encoded><![CDATA[<h2>HTML5 &#038; CSS3 form</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/670eb_css3-form-1.jpg" alt="" /><br /> HTML5 introduced useful new form elements as such as sliders, numeric spinners and date pickers. This tutorial will show you how to create a form with HTML5, and make it look really cool with CSS3. A great way to get started in both CSS3 and HTML5.<br /> <strong>&raquo; <a href="http://net.tutsplus.com/tutorials/html-css-techniques/how-to-build-cross-browser-html5-forms/">View tutorial</a></strong></p>
<h2>CSS3 form without images and JavaScript</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/670eb_css3-form-2.jpg" alt="" /><br /> This tutorial is in French, but the result looks so good that I simply shouldn&#8217;t include it on that list. For those who can&#8217;t understand French, just <a href="http://bbxdesign.com/wp-content/uploads/html/formulaire-css3.html">get the source code</a> and have fun with it.<br /> <strong>&raquo; <a href="http://bbxdesign.com/2010/03/24/tutoriel-formulaire-css3-sans-image-sans-javascript/">View tutorial</a></strong></p>
<h2>Stylish Contact Form with HTML5 &#038; CSS3</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/670eb_css3-form-3.jpg" alt="" /><br /> I really love what British web developer Chris Spooner creates. This time, he&#8217;s back with a quality tutorial about creating a form and using CSS3 to style it. The result is, as you can see above, really cool.<br /> <strong>&raquo; <a href="http://line25.com/tutorials/create-a-stylish-contact-form-with-html5-css3">View tutorial</a></strong></p>
<h2>Beautiful CSS3 Search Form</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/aa307_css3-form-4.jpg" alt="" /><br /> Most search forms (Including the one I use on this site!) looks boring. Using a little CSS3, you can turn the old and boring form into something definitely modern and cool. A must read tutorial.<br /> <strong>&raquo; <a href="http://webdesignerwall.com/tutorials/beautiful-css3-search-form">View tutorial</a></strong></p>
<h2>Prettier Web Form with CSS 3</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/aa307_css3-form.jpg" alt="" /><br /> This pretty simple tutorial will show you how you can create a form using some basic CSS3 properties, such as <code>box-shadow</code>.<br /> <strong>&raquo; <a href="http://net.tutsplus.com/tutorials/html-css-techniques/design-a-prettier-web-form-with-css-3/">View tutorial</a></strong></p>
<h2>Slick CSS3 Login Form</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/aa307_css3-form-6.jpg" alt="" /><br /> Once again, a simple tutorial to create a simple form using CSS3 but absolutely no images.<br /> <strong>&raquo; <a href="http://www.threestyles.com/tutorials/css3-login-form-tutorial/">View tutorial</a></strong></p>
<h2>Glowform: Amazing CSS3 form</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/aa307_css3-form-7.png" alt="" /><br /> Wow! This form looks really great, isn&#8217;t it? This form do not use any images, only CSS3. I urge you to read this tutorial and the form source code, because you&#8217;ll learn lots of great techniques about creating killer forms without using images.<br /> <strong>&raquo; <a href="http://kaylarose.github.com/Glowform/">View tutorial</a></strong></p>
<h2>Clean and Stylish CSS3 Form</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/26152_css3-form-8.png" alt="" /><br /> This form is simple, clean and stylish. Nothing fancy but techniques you&#8217;ll may use on most websites you&#8217;ll make.<br /> <strong>&raquo; <a href="http://gazpo.com/2011/02/form/">View tutorial</a></strong></p>
<h2>Signup form with CSS3 and jQuery</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/26152_css3-form-9.jpg" alt="" /><br /> jQuery is definitely a great tool to make forms more usable. This tutorial will show you how to create a good looking form using CSS3, and how to make it more user-friendly with some jQuery.<br /> <strong>&raquo; <a href="http://webexpedition18.com/articles/how-to-create-a-multi-step-signup-form-with-css3-and-jquery/">View tutorial</a></strong></p>
<h2>jQuery &#038; CSS3 Drop-down menu with integrated forms</h2>
<p><img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/f3fd9_css3-form-10.png" alt="" /><br /> At last but not least, here is a tutorial about how to create a CSS3/jQuery dropdown menu with integrated forms. No doubt, your clients will love it!<br /> <strong>&raquo; <a href="http://addyosmani.com/blog/formbox/">View tutorial</a></strong></p>
<p> <img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/f3fd9_n2iR47u4Pgw" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/Catswhocode">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/top-10-css-3-forms-tutorials/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>10 super useful PHP snippets</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-super-useful-php-snippets/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-super-useful-php-snippets/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 23:55:02 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[acos]]></category>
		<category><![CDATA[cached content]]></category>
		<category><![CDATA[caching system]]></category>
		<category><![CDATA[code snippet]]></category>
		<category><![CDATA[fwrite]]></category>
		<category><![CDATA[handy function]]></category>
		<category><![CDATA[latitudes and longitudes]]></category>
		<category><![CDATA[miles kilometers]]></category>
		<category><![CDATA[php snippets]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-super-useful-php-snippets/</guid>
		<description><![CDATA[Super simple page caching When your project isn&#8217;t based on a CMS or framework, it can be a good idea to implement a simple caching system on your pages. The following code snippet is very simple, but works well for small websites. &#60;?php // define the path and name of cached file $cachefile = &#039;cached-files/&#039;.date(&#039;M-d-Y&#039;).&#039;.php&#039;; [...]]]></description>
			<content:encoded><![CDATA[<h2>Super simple page caching</h2>
<p>When your project isn&#8217;t based on a CMS or framework, it can be a good idea to implement a simple caching system on your pages. The following code snippet is very simple, but works well for small websites.</p>
<pre>
&lt;?php
    // define the path and name of cached file
    $cachefile = &#039;cached-files/&#039;.date(&#039;M-d-Y&#039;).&#039;.php&#039;;
    // define how long we want to keep the file in seconds. I set mine to 5 hours.
    $cachetime = 18000;
    // Check if the cached file is still fresh. If it is, serve it up and exit.
    if (file_exists($cachefile) &amp;&amp; time() - $cachetime &lt; filemtime($cachefile)) {
    include($cachefile);
        exit;
    }
    // if there is either no file OR the file to too old, render the page and capture the HTML.
    ob_start();
?&gt;
    &lt;html&gt;
        output all your html here.
    &lt;/html&gt;
&lt;?php
    // We&#039;re done! Save the cached content to a file
    $fp = fopen($cachefile, &#039;w&#039;);
    fwrite($fp, ob_get_contents());
    fclose($fp);
    // finally send browser output
    ob_end_flush();
?&gt;
</pre>
<p><strong>&raquo; <a href="http://wesbos.com/simple-php-page-caching-technique/">Credit: Wes Bos</a></strong></p>
<h2>Calculate distances in PHP</h2>
<p>Here is a very handy function, which calculate the distance from a point A to a point B, using latitudes and longitudes. The function can return the distance in miles, kilometers, or nautical miles.</p>
<pre>
function distance($lat1, $lon1, $lat2, $lon2, $unit) { 

  $theta = $lon1 - $lon2;
  $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) +  cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));
  $dist = acos($dist);
  $dist = rad2deg($dist);
  $miles = $dist * 60 * 1.1515;
  $unit = strtoupper($unit);

  if ($unit == &quot;K&quot;) {
    return ($miles * 1.609344);
  } else if ($unit == &quot;N&quot;) {
      return ($miles * 0.8684);
    } else {
        return $miles;
      }
}
</pre>
<p>Usage:</p>
<pre>echo distance(32.9697, -96.80322, 29.46786, -98.53506, "k")." kilometers";</pre>
<p><strong>&raquo; <a href="http://www.phpsnippets.info/calculate-distances-in-php">Credits: PHP Snippets.info</a></strong></p>
<h2>Convert seconds to time (years, months, days, hours&#8230;)</h2>
<p>This useful function will convert a time in seconds to a time in years, months, weeks, days, and so on.</p>
<pre>
function Sec2Time($time){
  if(is_numeric($time)){
    $value = array(
      &quot;years&quot; =&gt; 0, &quot;days&quot; =&gt; 0, &quot;hours&quot; =&gt; 0,
      &quot;minutes&quot; =&gt; 0, &quot;seconds&quot; =&gt; 0,
    );
    if($time &gt;= 31556926){
      $value[&quot;years&quot;] = floor($time/31556926);
      $time = ($time%31556926);
    }
    if($time &gt;= 86400){
      $value[&quot;days&quot;] = floor($time/86400);
      $time = ($time%86400);
    }
    if($time &gt;= 3600){
      $value[&quot;hours&quot;] = floor($time/3600);
      $time = ($time%3600);
    }
    if($time &gt;= 60){
      $value[&quot;minutes&quot;] = floor($time/60);
      $time = ($time%60);
    }
    $value[&quot;seconds&quot;] = floor($time);
    return (array) $value;
  }else{
    return (bool) FALSE;
  }
}
</pre>
<p><strong>&raquo; <a href="http://ckorp.net/sec2time.php">Credits</a></strong></p>
<h2>Force file download</h2>
<p>Some files, such as mp3, are generally played throught the client browser. If you prefer forcing download of such files, this is not a problem: The following code snippet will do that job properly.</p>
<pre>
function downloadFile($file){
        $file_name = $file;
        $mime = 'application/force-download';
	header('Pragma: public'); 	// required
	header('Expires: 0');		// no cache
	header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
	header('Cache-Control: private',false);
	header('Content-Type: '.$mime);
	header('Content-Disposition: attachment; filename="'.basename($file_name).'"');
	header('Content-Transfer-Encoding: binary');
	header('Connection: close');
	readfile($file_name);		// push it out
	exit();
}
</pre>
<p><strong>&raquo; <a href="http://www.tecnocrazia.com/">Credit: Alessio Delmonti</a></strong></p>
<h2>Get current weather using Google API</h2>
<p>Want to know today&#8217;s weather? This snippet will let you know, in only 3 lines of code. The only thing you have to do is to replace ADDRESS by the desired adress, on line 1.</p>
<pre>
$xml = simplexml_load_file(&#039;http://www.google.com/ig/api?weather=ADDRESS&#039;);
  $information = $xml-&gt;xpath(&quot;/xml_api_reply/weather/current_conditions/condition&quot;);
  echo $information[0]-&gt;attributes();
</pre>
<p><strong>&raquo; <a href="http://ortanotes.tumblr.com/post/200469319/current-weather-in-3-lines-of-php">Credit: Ortanotes</a></strong></p>
<h2>Basic PHP whois</h2>
<p>Whois services are extremely useful to get basic information about a domain name: owner, creation date, registrar, etc. Using PHP and the <code>whois</code> unix command, it is extremely easy to create a basic whois PHP function. Please note that the <code>whois</code> unix command must be installed on your server for this code to work.</p>
<pre>
$domains = array(&#039;home.pl&#039;, &#039;w3c.org&#039;);

function creation_date($domain) {
    $lines = explode(&quot;\n&quot;, `whois $domain`);
    foreach($lines as $line) {
        if(strpos(strtolower($line), &#039;created&#039;) !== false) {
            return $line;
        }
    }

    return false;
}

foreach($domains as $d) {
    echo creation_date($d) . &quot;\n&quot;;
}
</pre>
<p><strong>&raquo; <a href="http://snipplr.com/view.php?codeview&amp;id=48040">Credits: Snipplr</a></strong></p>
<h2>Get latitude and longitude from an adress</h2>
<p>With the popularity of the Google Maps API, developers often needs to get the latitude and longitude of a particular place. This very useful function takes an adress as a parameter, and will return an array of data containing both latitude and longitude.</p>
<pre>
function getLatLong($address){
	if (!is_string($address))die(&quot;All Addresses must be passed as a string&quot;);
	$_url = sprintf(&#039;http://maps.google.com/maps?output=js&amp;q=%s&#039;,rawurlencode($address));
	$_result = false;
	if($_result = file_get_contents($_url)) {
		if(strpos($_result,&#039;errortips&#039;) &gt; 1 || strpos($_result,&#039;Did you mean:&#039;) !== false) return false;
		preg_match(&#039;!center:\s*{lat:\s*(-?\d+\.\d+),lng:\s*(-?\d+\.\d+)}!U&#039;, $_result, $_match);
		$_coords[&#039;lat&#039;] = $_match[1];
		$_coords[&#039;long&#039;] = $_match[2];
	}
	return $_coords;
}
</pre>
<p><strong>&raquo; <a href="http://snipplr.com/view.php?codeview&amp;id=47806">Credits: Snipplr</a></strong></p>
<h2>Get domain favicon using PHP and Google</h2>
<p>These days, many websites or webapps are using favicons from other websites. Displaying a favicon on your own site is pretty easy using Google and some PHP.</p>
<pre>
function get_favicon($url){
  $url = str_replace(&quot;http://&quot;,&#039;&#039;,$url);
  return &quot;http://www.google.com/s2/favicons?domain=&quot;.$url;
}
</pre>
<p><strong>&raquo; <a href="http://snipplr.com/view.php?codeview&amp;id=45928">Credits: Snipplr</a></strong></p>
<h2>Calculate Paypal fees</h2>
<p>Ah, Paypal fees. Every person who ever used the popular online payment service had to pay their fees. So what about a PHP function to easily calculate the fee for a specific amount?</p>
<pre>
function paypalFees($sub_total, $round_fee) {

	// Set Fee Rate Variables
	$fee_percent = &#039;3.4&#039;; // Paypal&#039;s percentage rate per transaction (3.4% in UK)
	$fee_cash    = &#039;0.20&#039;; // Paypal&#039;s set cash amount per transaction (&#163;0.20 in UK)

	// Calculate Fees
	$paypal_fee = ((($sub_total / 100) * $fee_percent) + $fee_cash);

	if ($round_fee == true) {
		$paypal_fee = ceil($paypal_fee);
	}

	// Calculate Grand Total
	$grand_total = ($sub_total + $paypal_fee);

	// Tidy Up Numbers
	$sub_total   = number_format($sub_total, 2, &#039;.&#039;, &#039;,&#039;);
	$paypal_fee  = number_format($paypal_fee, 2, &#039;.&#039;, &#039;,&#039;);
	$grand_total = number_format($grand_total, 2, &#039;.&#039;, &#039;,&#039;);

	// Return Array
	return array(&#039;grand_total&#039;=&gt;$grand_total, &#039;paypal_fee&#039;=&gt;$paypal_fee, &#039;sub_total&#039;=&gt;$sub_total);
}
</pre>
<p><strong>&raquo; <a href="http://snipplr.com/view.php?codeview&amp;id=44373">Credits: Snipplr</a></strong></p>
<p><em>(Last snippet have been removed due to an error, sorry)</em></p>
<p> <img src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/0df26_JrGX1_-mHds" height="1" width="1" /><br />
<a href="http://feeds2.feedburner.com/Catswhocode">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/php/10-super-useful-php-snippets/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Suspension, Ban or Hellban?</title>
		<link>http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/suspension-ban-or-hellban/</link>
		<comments>http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/suspension-ban-or-hellban/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 23:51:52 +0000</pubDate>
		<dc:creator>Facebook-Web-Design</dc:creator>
				<category><![CDATA[funny]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[form of government]]></category>
		<category><![CDATA[frontier town]]></category>
		<category><![CDATA[hellip]]></category>
		<category><![CDATA[homebrewing]]></category>
		<category><![CDATA[initial suspension]]></category>
		<category><![CDATA[new frontier]]></category>
		<category><![CDATA[problematic behaviors]]></category>
		<category><![CDATA[stack overflow]]></category>
		<category><![CDATA[tiny minority]]></category>

		<guid isPermaLink="false">http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/suspension-ban-or-hellban/</guid>
		<description><![CDATA[For almost eight months after launching Stack Overflow to the public, we had no concept of banning or blocking users. Like any new frontier town in the wilderness of the internet, I suppose it was inevitable that we&#8217;d be obliged to build a jail at some point. But first we had to come up with [...]]]></description>
			<content:encoded><![CDATA[<p>
For almost eight months after launching Stack Overflow to the public, we had no concept of banning or blocking users. Like any new frontier town in the wilderness of the internet, I suppose it was inevitable that we&#8217;d be obliged to build a jail at some point. But first we had to come up with some form of <i>government</i>. </p>
<p>
Stack Overflow was always intended to be a democracy. With the <a href="http://stackexchange.com/sites">Stack Exchange Q&amp;A network</a>, we&#8217;ve come a long way towards that goal:</p>
<ul>
<li>We create new communities through the open, democratic process defined at <a href="http://area51.stackexchange.com/">Area 51</a>.
<li>Our communities are maintained and operated by the most avid citizens within that community. The more reputation you have, the more <a href="http://blog.stackoverflow.com/2010/10/membership-has-its-privileges/">privileges you earn</a>.
<li>We hold <a href="http://blog.stackoverflow.com/2010/12/stack-exchange-moderator-elections-begin/">yearly moderator elections</a> once each community is large enough to support them.
</ul>
<p>
We strive mightily to build self organizing, self governing communities of people who are passionate about a topic, whether it be <a href="http://mechanics.stackexchange.com/">motor vehicles</a> or <a href="http://homebrew.stackexchange.com/">homebrewing</a> or <a href="http://music.stackexchange.com/">musical instruments</a>, or &hellip; <a href="http://area51.stackexchange.com/"><i>whatever</i></a>. Our general philosophy is <i>power to the people</i>.</p>
<p>
<img class="asset  asset-image at-xid-6a0120a85dcdae970b01538eefee40970b" alt="Power-to-the-people" src="http://www.neurosoftware.ro/programming-blog/wp-content/plugins/wp-o-matic/cache/ef612_6a0120a85dcdae970b01538eefee40970b-800wi" border="0" /></p>
<p>
But in the absence of <i>some</i> system of law, the tiny minority of users out to do harm &ndash; intentionally or not &ndash; eventually drive out all the civil community members, leaving behind a lawless, chaotic badland.</p>
<p>
Our method of dealing with disruptive or destructive community members is simple: <b>their accounts are placed in timed suspension.</b> Initial suspension periods range from 1 to 7 days, and increase exponentially with each subsequent suspension. We prefer the term &#8220;timed suspension&#8221; to &#8220;ban&#8221; to emphasize that we <i>do</i> want users to come back to their accounts, <i>if</i> they can learn to refrain from engaging in those disruptive or problematic behaviors. It&#8217;s not so much a punishment as a time for the user to cool down and reflect on the nature of their participation in our community. (Well, at least in theory.)</p>
<p>
Timed suspension works, but much like democracy itself, it is a highly imperfect, noisy system. The transparency provides ample evidence that moderators aren&#8217;t secretly whisking people away in the middle of the night. But it can also be a bit too &hellip; <i>entertaining</i> for some members of the community, leading to hours and hours of meta-discussion about who is suspended, why they are suspended, whether it was <i>fair</i>, what the <i>evidence</i> is, how we are <i>censoring</i> people, and on and on and on. While a certain amount of introspection is important and necessary, it can also become <a href="http://www.codinghorror.com/blog/2009/07/meta-is-murder.html">a substitute for getting stuff done</a>. This might naturally lead one to wonder &ndash; <b>what if we could suspend problematic users without anyone knowing they had been suspended?</b></p>
<p>
There are three primary forms of secretly suspending users that I know of:</p>
<ol>
<li>A <b>hellbanned</b> user is invisible to all other users, but crucially, not himself. From their perspective, they are participating normally in the community but <i>nobody ever responds to them</i>. They can no longer disrupt the community because they are effectively a ghost. It&#8217;s a clever way of enforcing the &#8220;don&#8217;t feed the troll&#8221; rule in the community. When nothing they post ever gets a response, a hellbanned user is likely to get bored or frustrated and leave. I believe it, too; if I learned anything from reading <a href="http://www.amazon.com/dp/0803725906/?tag=codinghorror-20">The Great Brain</a> as a child, it&#8217;s that the silent treatment is the cruelest punishment of them all.
<p>
I&#8217;ve always associated hellbanning with the Something Awful Forums. Per <a href="http://ask.metafilter.com/117775/What-was-the-first-website-to-hide-trolls-activity-to-everyone-but-the-troll-himself">this amazing MetaFilter discussion</a>, it turns out the roots of hellbanning go much deeper &ndash; all the way back to an early Telnet BBS system called <a href="http://anticlimactic.retrovertigo.com/">Citadel</a>, where the &#8220;problem user bit&#8221; was introduced around 1986. Like so many other things in social software, it keeps getting reinvented over and over again by <a href="http://www.wired.com/techbiz/people/magazine/17-04/st_thompson">clueless software developers</a> who believe they&#8217;re the first programmer smart enough to figure out how people work. It&#8217;s supported in most popular forum and blog software, as documented in the <a href="http://drupal.org/project/cave">Drupal Cave module</a>.</p>
<p>
(There is one additional form of hellbanning that I feel compelled to mention because it is particularly cruel &ndash; when hellbanned users can see only themselves <i>and other hellbanned users</i>. Brrr. I&#8217;m pretty sure Dante wrote a chapter about that, <a href="http://en.wikipedia.org/wiki/Inferno_(Dante)">somewhere</a>.)</p>
<li>A <b>slowbanned</b> user has delays forcibly introduced into every page they visit. From their perspective, your site has just gotten terribly, horribly slow. And stays that way. They can hardly disrupt the community when they&#8217;re struggling to get web pages to load. There&#8217;s also science behind this one, because <a href="http://www.codinghorror.com/blog/2006/11/speed-still-matters.html">per research from Google and Amazon</a>, every page load delay directly reduces participation. Get slow enough, for long enough, and a slowbanned user is likely to seek out greener and speedier pastures elsewhere on the internet.
<p><li>An <b>errorbanned</b> user has errors inserted at random into pages they visit. You might consider this a more severe extension of slowbanning &ndash; instead of pages loading slowly, they might not load at all, return cryptic HTTP errors, return the wrong page altogether, fail to load key dependencies like JavaScript and images and CSS, and so forth. I&#8217;m sure your devious little brains can imagine dozens of ways things could go &#8220;wrong&#8221; for an errorbanned user. This one is a bit more esoteric, but it isn&#8217;t theoretical; an existing implementation exists in the form of the <a href="http://drupal.org/project/misery">Drupal Misery module</a>.
</ol>
<p>
Because we try to hew so closely to the real world model of democracy with Stack Exchange, I&#8217;m not quite sure how I feel about these sorts of reality-altering tricks that are impossible in the world of atoms. On some level, they feel disingenuous to me. And it&#8217;s a bit like <a href="http://en.wikipedia.org/wiki/It's_a_Good_Life_(The_Twilight_Zone)">wishing users into the cornfield</a> with superhuman powers far beyond the ken of normal people. But I&#8217;ve also spent many painful hours trapped in public dialog about users who were, <i>at best</i>, just wasting everyone&#8217;s time. Democracy is a wonderful thing, but efficient, it ain&#8217;t.</p>
<p>
That said, every community is different. I&#8217;ve personally talked to people in charge of large online communities &ndash; ones you probably participate in every day &ndash; and part of the reason those communities <i>haven&#8217;t</i> broken down into utter chaos by now is because they secretly <b>hellban</b> and <b>slowban</b> their most problematic users. These solutions do neatly solve the problem of getting troublesome users to &#8220;voluntarily&#8221; decide to leave a community with a minimum of drama. It&#8217;s hard to argue with techniques that are proven to work.</p>
<p>
I think everyone has a right to know what sort of jail their community uses, even these secret, invisible ones. But keep in mind that whether it&#8217;s timed suspensions, traditional bans, or exotic hellbans and beyond, the goal is the same: civil, sane, and safe online communities for everyone. </p>
<p>
<a href="http://feeds.feedburner.com/codinghorror">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neurosoftware.ro/programming-blog/facebook-web-design/programming/suspension-ban-or-hellban/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

