<?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>Hey, I&#039;m J.R. &#187; Web Design</title>
	<atom:link href="http://juanpatten.com/category/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://juanpatten.com</link>
	<description>life is awesome</description>
	<lastBuildDate>Thu, 03 Sep 2009 02:58:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Working with 960.gs</title>
		<link>http://juanpatten.com/2008/working-with-960gs/</link>
		<comments>http://juanpatten.com/2008/working-with-960gs/#comments</comments>
		<pubDate>Tue, 06 May 2008 21:28:08 +0000</pubDate>
		<dc:creator>JR</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[960gs]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[framework]]></category>

		<guid isPermaLink="false">http://www.runningskull.com/?p=24</guid>
		<description><![CDATA[There&#8217;s been a lot of talk in the intarwebnets recently about the benefits of CSS frameworks.  I insist on hand-coding, but I really don&#8217;t like working with CSS (particularly haggling with a certain 6th edition browser that starts with Internet and ends with Explorer)  so I&#8217;ve always like the idea of a structure [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://960.gs"><img class="float-l alignnone size-medium wp-image-25" title="h1" src="http://www.runningskull.com/wp-content/uploads/2008/05/h1.gif" alt="" width="300" height="200" /></a>There&#8217;s been a lot of talk in the intarwebnets recently about the benefits of CSS frameworks.  I insist on hand-coding, but I really don&#8217;t like working with CSS (particularly haggling with a certain 6th edition browser that starts with Internet and ends with Explorer)  so I&#8217;ve always like the idea of a structure to make it easy for me, like a GUI framework for desktop apps.  I&#8217;ve looked into some of the more popular, like <a href="http://code.google.com/p/blueprintcss/">Blueprint</a> and <a href="http://developer.yahoo.com/yui/grids/">YUI</a>, but haven&#8217;t liked/used either for whatever reason, though I&#8217;ve always liked the concept.</p>
<p>Then, I decided to make this site, and I didn&#8217;t use any framework.  I started with a pre-made theme and smashed, manhandled, sliced, and diced it until it was something kind of like what I wanted.  I had floated div&#8217;s, crazy margins, and all manner of other hacks for whipping the stylesheet into submission.  I got it working and I wasn&#8217;t really with how messy it was, but I didn&#8217;t have time to do anything about it with final projects and final exams taking up all of my time.  Now that the semester is over, I decided to re-do it.</p>
<p>I decided on <a href="http://960.gs">960.gs</a> after reading a blog post about it (wish I could remember where, so I could send some link love).  I looked into it and found a professional, well-developed framework that had some good ideas that I was interested in, so I decided to give it a try.  Boy am I glad I did.  It took only a little more than 2 hours, and it looks better than it did before.   Here&#8217;s a quick overview of how to use it:</p>
<h3>Downloading and Installing</h3>
<p>There really is no &#8220;installation&#8221;.  You just download the ZIP file, and extract it into your CSS directory (or your theme&#8217;s CSS directory if you&#8217;re using Wordpress).  Presto!  Working framework.   I changed the folder paths around a little bit, but you can really use it without changing anything.</p>
<p>The ZIP file comes with a lot of stuff to help you design with the 960 system, including &#8220;PDF grid paper, templates for Fireworks, OmniGraffle, Photoshop &amp; Visio, and CSS framework with demo HTML&#8221;.  I only used the CSS files, which is all you need for coding your site.  The system comes with 3 CSS files.</p>
<ol>
<li><strong>960.css</strong> &#8211; Sets up the grid system, the 12-, and 16-column <code>containers</code>, <code>alpha</code>, <code>omega</code>, and <code>prefix</code>.  <em>This file is necessary to the grid system.</em></li>
<li><strong>reset.css </strong>- &#8220;Initializes&#8221; the system so that all margins and paddings are 0, outline is 0, etc&#8230; <em>This file is necessary to the grid system.</em></li>
<li><strong>text.css </strong>- Sets the font sizes including headers, adds margins to lists, etc&#8230;  <em>This file is not technically needed for the system, as far as I can tell.</em></li>
</ol>
<p>Also, the CSS files are very lightweight, and won&#8217;t add any significant loading time to the page, which is something that other frameworks struggle with.</p>
<h3>Using it</h3>
<p>The system is based around a 960 pixel-wide grid (hence the name).  The grid system is a great way to produce good designs without a lot of overhead (Smashing Magazine&#8217;s got a <a href="http://www.smashingmagazine.com/2007/04/14/designing-with-grid-based-approach/">great article</a> about grids).  You have the option of dividing the 960 pixels into 12 or 16 columns.  960.gs uses the following classes to structure the page:</p>
<ul>
<li><strong><code>container_XX </code></strong>is used in the outermost box to determine how many columns.  You can use <code>container_12</code> or <code>container_16</code>.</li>
<li><strong><code>grid_XX</code></strong> is the bread and butter of the system.  XX is for how many columns you want the block to be.  For example, <code>grid_10</code> will be 10 columns wide.  The exact pixel width is determined by how many columns you&#8217;ve divided the grid into.</li>
<li><strong><code>prefix_XX</code></strong> allows you to add in blank columns before a block.  <code>XX</code> specifies how many blank columns you want.</li>
<li><strong><code>alpha</code></strong> is for if you have children blocks. If you do this, you&#8217;ll want the first child to have no margin on the left side. <code>alpha</code> makes that happen.</li>
<li><strong><code>omega </code></strong>is similar to <code>alpha</code>, except that it gives no margin on the right side.  Use it for the last child.</li>
</ul>
<p>That&#8217;s it.  All you have to do is apply classes to boxes. It&#8217;s that simple to use.  In the outermost container, decide how many columns to use.  Then, all you have to do is add classes to your elements to lay them out on the page.  It couldn&#8217;t be any easier.</p>
<h3>Some gotchas</h3>
<p><strong>The padding problem</strong>: This isn&#8217;t really a problem with the framework.  It&#8217;s just standard CSS, but it&#8217;s good to know.  If you want one of your <code>grid_XX</code> cells to have padding, you can&#8217;t apply the padding directly to the cell, since that padding will add to the width of the cell, throwing off the grid.  The way to pad the grid cells is to add another, non-<code>grid_XX</code> cell inside it and pad that one.  The sample code uses &lt;p&gt; for that purpose, but I&#8217;ve used &lt;div&gt;.  It doesn&#8217;t really matter.</p>
<p><strong>The width problem</strong>: What if you want your grid to be more or less than 960 pixels wide, or you want it to be fluid?  You choose another framework.  The framework is named <strong>960</strong> for a reason.  It&#8217;s 960 pixels wide, and short of hacking the CSS, there&#8217;s nothing you can do to change that.  However, as detailed on their site, 960 pixels is a great width.  From the site:</p>
<blockquote><p>All modern monitors support at least 1024 × 768 pixel resolution. 960 is divisible by 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 20, 24, 30, 32, 40, 48, 60, 64, 80, 96, 120, 160, 192, 240, 320 and 480. This makes it a highly flexible base number to work with.</p></blockquote>
<h3>Summary</h3>
<p>I&#8217;m very impressed by how easy the system is to use, even for a CSS-klutz like me.  The class-based layout design makes it extremely easy for me to translate the ideas in my head into CSS code without having to fiddle around with fragile floating and margin-ing.</p>
<p>I haven&#8217;t used the system in the most ideal or pure way (see the sidebar in particular), but the overall layout of the site is done totally with 960.gs.  It worked perfectly.  I didn&#8217;t have to hack their files to get it working like I wanted it to.  It just worked as advertised, and made me happy.</p>
<p>I didn&#8217;t use the other files that came with the package, like the Photoshop template or the PDF paper since I already had the site designed, but I&#8217;ve looked at them, and they allow you to design exactly how the page will look, and when you code the site, I&#8217;m sure you&#8217;ll see it stays true to the design.</p>
<p>Thanks, <a href="http://sonspring.com/journal/960-grid-system">Nathan Smith</a>, for the great CSS system.  You&#8217;ve made my life easier, and I appreciate it!</p>
]]></content:encoded>
			<wfw:commentRss>http://juanpatten.com/2008/working-with-960gs/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
