Mastering the 960 Grid System

Mastering the 960 Grid System

Tutorial Details
  • Program: 960 Grid System
  • Topic: HTML / CSS Grids
  • Difficulty: Beginner to Intermediate
  • Estimated Completion Time: One hour

We’re already familiar with the 12- and 16-column variants of 960.gs, but did you know that a 24-column alternative exists too? In this article, you’ll master the 960 grid system by dissecting the 24-column version demo. If you’ve only used 960gs before for Photoshop mockups, consider this your lucky day. By the end of this article, you’ll be able to convert your designs to HTML and CSS in no time at all.


Introduction

A 960 Grid System Master—that’s what you’ll be after you’ve gone through this article. And, although we’re going to use the 24-column variant of 960gs, you’ll completely understand how the two older types (i.e., 12- and 16-columns) work too, by applying the same principles you’ll learn here. But first, take a good look at the 24-column demo in the 960gs site, as it’s all we’ll need in our leap towards mastery of this popular CSS framework.


A Look at the 24-Column Demo

We first need to check the HTML code of the demo, so view its source—if you’re using Chrome, Firefox, or Opera, just press ctrl+U; if you’re using Internet Explorer, change your browser! :) (on the Mac, use cmd+U for Firefox and opt+cmd+U for Safari and Opera; Chrome only does the right-click option). Keep the HTML source code window on your desktop, as we’re going to refer to it from time to time.

Next, you’ll need to download the 960.gs files (if you haven’t done so yet), and open the uncompressed CSS file 960_24_col.css. We must do this because the demo’s CSS is compressed, and will be difficult to inspect. (If you’re the masochistic type, feel free to use the demo’s CSS instead.

That’s pretty much all we need to prepare, aside from a semi-functioning brain. Now you’ll find that the demo page holds the key to completely understanding the grid system, and we’ll start by examining its three sections.


Inspecting the Framework: The Demo’s Three Sections

The three sections consist of the following:

1: Top Section

First, we have a top area that shows two columns for each row, where the left column grows wider as the right column gets narrower, until they are equal in size.

top section of the 24-column 960 demo

2: Middle Section

Next, we have a middle section that shows a 30px square progressively moving from left to right, while whitespace before and after it extends the row to take up the whole 960px width.

mid-section of the 24-column 960 demo

3: Bottom Section

Finally, there’s a bottom section that shows two rows of rectangles with different sizes, which split the 960px width in two halves.

bottom section of the 24-column 960 demo

Believe it or not, understanding completely what the assigned classes behind these columns do is all you’ll ever need to get a firm grasp of 960 grid system. Isn’t that great? Let’s examine each section further.


Top section: grid_1 to grid_24 classes

Peeking at the source code of this section shows us that, first, before any of the grid_xx classes were assigned, the class container_24 was given to the overall wrapping div:

    
<div class="container_24"> 
	<h2> 
		24 Column Grid
	</h2>
	...
</div>
<!-- end .container_24 --> 

The importance of this class cannot be overemphasized—it partly dictates the width of the columns where a grid_xx class is assigned. And as you might have guessed, it also “divides” the 960px width into 24 columns.

(Similarly, putting container_12 or container_16 at the top will “divide” the width into 12 and 16 columns, respectively. The word divide is in quotes because it doesn’t actually do that; you’ll see later how this process is achieved.)

Moving on, you’ll notice that the top-most row has a single div with a class of grid_24. The remaining rows in the top section have two divs each: the left divs range from class grid_1 up to grid_12, and the right divs range from grid_23 down to grid_12; the sum of the two classes in each row is 24.

     
<div class="grid_24"> 
	<p> 
		950
	</p> 
</div> 
<!-- end .grid_24 --> 

<div class="clear"></div> 

<div class="grid_1"> 
	<p> 
		30
	</p> 
</div> 
<!-- end .grid_1 --> 

<div class="grid_23"> 
	<p> 
		910
	</p> 
</div> 
<!-- end .grid_23 --> 

<div class="clear"></div> 

<div class="grid_2"> 
	<p> 
		70
	</p> 
</div> 
<!-- end .grid_2 -->



<div class="grid_11"> 
	<p> 
		430
	</p> 
</div> 
<!-- end .grid_11 --> 

<div class="grid_13"> 
	<p> 
		510
	</p> 
</div> 
<!-- end .grid_13 --> 

<div class="clear"></div> 

<div class="grid_12"> 
	<p> 
		470
	</p> 
</div> 
<!-- end .grid_12 --> 

<div class="grid_12"> 
	<p> 
		470
	</p> 
</div> 
<!-- end .grid_12 --> 

<div class="clear"></div>

This is how the assigned grid_xx classes would look like if we tried to visualize each div’s class name:

top section of the 24-column 960 demo with grid classes labeled

You might have noticed in the code that after the last div in a row, we have an empty div with a class of clear. Ignore it for now, we’ll deal with it later.

Next, let’s take a look at what happens behind the scenes, i.e., in the CSS, when we assign the container_24 class:

        .container_24 {
            margin-left: auto;
            margin-right: auto;
            width: 960px;
        }
        

As you can see, this class, which was assigned to the overall wrapping div of the document, centers our work area and gives it a 960px width. Easy enough.

Next, here are the grid_xx classes, which were placed on the main divs of the top section:

        
        .grid_1,
        .grid_2,
        .grid_3,
        ...
        .grid_23,
        .grid_24 {
            display: inline;
            float: left;
            margin-left: 5px;
            margin-right: 5px;
        }
        

We see that the grid_xx classes give the columns left and right margins of 5px each, which forms a 10px gutter when you place the columns side-by-side. This in turn is achieved by floating them all to the left.

Also, they are given a display of inline, to prevent the Double Margin Float Bug from being triggered in our dearly-beloved browser. (Apparently, it is triggered when you float an element that has margins assigned to it.)

top section: what the CSS does

Lastly, we have the descendant selectors formed by a combination of container_24 and grid_xx classes:

  
        .container_24 .grid_1 {
            width: 30px;
        }
        .container_24 .grid_2 {
            width: 70px;
        }
        ...
        ...
        .container_24 .grid_23 {
            width: 910px;
        }
        .container_24 .grid_24 {
            width: 950px;
        }
        

As you can see, these CSS declarations are the ones that actually determine the width of the columns where a grid_xx class is assigned. This is how assigning container_24 at the top “divides” the width into 24 columns— the pre-set width sizes are assigned according to which container_xx class a grid_xx class is combined with.

the container and grid classes in 24-col combined sets the width of the columns

For comparison purposes, here is how its counterpart CSS declarations in the 16-column variant looks like:

         
        .container_16 .grid_1 {
            width: 40px;
        }
        
        .container_16 .grid_2 {
            width: 100px;
        }
        
        .container_16 .grid_3 {
            width: 160px;
        }
        
the container and grid classes in 16-col combined sets the width of the columns

If you compare the HTML source code of the demo for the 12- and 16-columns with the 24-column demo, you’ll notice that there is no difference in how the grid_xx classes were assigned. And now you know why this is so—it’s not the grid_xx class that determines the width of the columns, but its combination with a container_xx class, as shown in the CSS above.

Another thing worth noting here is the actual size of each container when you assign a grid_xx class. Although it’s labeled 30, 70, 110, and so on in the demo, it’s actually 10px more because of the left and right margins on either side of the container.

actual size of the containers is 10px more than its label

As you can see,

  • grid_1 has a width of 30px + 10px horizontal margins (total width: 40px)
  • grid_2 has a width of grid_1 (40px) + 30px width + 10px margins (total width: 80px)
  • grid_24 has a width of grid_23 (920px) + 30px width + 10px margins (total width: 960px)

Seeing it this way satisfies the math we have for the width: that 24 40px-wide columns is equal to 960px (i.e., 40px * 24 = 960px).

This view more accurately shows what the CSS actually does to the markup. Although the container’s size is really just 30px, 70px, 110px, and so on (as it is labeled in the demo), it helps to know that the horizontal margins are the reason why the sum of the widths for each row do not equal to 960px. (It only amounts to 940px, except for the first row, assigned a grid_24, which spans 950px. The “lost” 20px for all the other divs is accounted for by the leftmost and rightmost 5px margins, and the 10px gutter between the 2 columns for each row.)

But here’s the more practical thing to remember: As long as you use the 24-column psd template when you create your designs (or the 12- or 16-column psd templates, for that matter), you can just count the number of columns you want for a particular design element, use that number for your grid_xx class, and the column is set. For example, if your logo takes up four columns, then give its containing div a grid_4 class.

Here’s an example of how to use it:

example application of grid_xx classes

Although the 960.gs site (shown above) actually uses the 12-column variant, we could just as well overlay the 24-column pattern on it and it will still fit the layout perfectly (because the 24-column version is, of course, just the 12-column version with columns divided by two).

As you can see, knowing that we have a 960px width divided into 24 columns makes life easier, as we only need to line up our design elements along the edges of the columns, count the number of columns they occupy, set that as our grid_xx class’s number, and we’re done.

But what if you want a lot of empty spaces in your design? Or what if you want to center a small design element, and just have white spaces around it?

Enter the prefix_xx and suffix_xx classes.


Middle Section: prefix_xx and suffix_xx classes

If you check the markup for the middle section, what you’ll see are variations of this code:

<div class="grid_1 prefix_xx suffix_xx"> 
    <p>
        30
    </p> 
</div> 
    

…where prefix_xx + suffix_xx = 23. (That is, 0 + 23, 1 + 22, 2 + 21, 3 + 20, and so on..)

What’s happening here?

First, you’ll notice that each row class assignments amount to 24 columns (grid_1 + combined values of prefix_xx and suffix_xx classes, which is 23).

Next, you’ll see that the prefix_xx classes are in ascending order (from 1 to 23) while the suffix_xx classes are descending (from 23 to 1). Also, when prefix_xx or suffix_xx has a value of 23, it doesn’t have a counterpart suffix_xx or prefix_xx class, because it no longer needs it (value is already 23).

Lastly, each of these units is 30px-wide, and as we’ve seen in the grid_xx classes above, they also have 10px horizontal margins.

classes added for the 30px boxes

We already know that assigning an element a grid_1 class gives it a 30px width and 5px paddings on either side. But what does the prefix_xx and suffix_xx classes do?

As you may have already guessed, they give additional left (prefix_xx) and right (suffix_xx) padding, increasing the size of a grid_xx class unit. Thus, prefix_1, prefix_2, and prefix_3 will give your element left paddings of 40px, 80px, and 120px, respectively; while the same amount of paddings are given to its suffix_xx counterparts, but in the opposite side.

     
.container_24 .prefix_1 {
    padding-left: 40px;
}        
.container_24 .prefix_2 {
    padding-left: 80px;
}

...

.container_24 .suffix_1 {
    padding-right: 40px;
}

.container_24 .suffix_2 {
    padding-right: 80px;
}

For whitespace in your designs, just add the prefix_xx and suffix_xx classes. They lock up your content to a certain width (determined by the grid_xx class you assign), while the space on either side in filled up with padding.

additional horizontal paddings in grid_xx units

For a simple example, let’s pretend again that the 960.gs homepage is using the 24-column variant, and that the twitter-bird graphic is the logo of the site.

suffix class in use: 960 gs homepage

We can see that it occupies three columns, so we give it a grid_3 class. Let’s also assume that there are no other elements along its row. We would therefore also give it a suffix_21 class (3 + 21 = 24), since the additional padding needs to span the whole width.

Obviously, if there are other elements on that row, we need to adjust the suffix_xx class to create some space for another element that spans a few grid_xx classes (e.g. a search form). Also, depending on where your design elements are located relative to the left edge of the row, you might also need to add a prefix_xx class.

Always remember: the numbers used in the classes for each row (whether grid, prefix, or suffix) should be equal to 24.

Next, we’ll perform a bit of ‘magic,’ as the next set of classes allow your content to appear differently than what the markup predicts it would.


Bottom Section: pull_xx and push_xx Classes

For this section, if you're not using Firefox at the moment, I'd like to ask you to switch to it temporarily, as you'll understand the next concepts better with Chris Pederick's Web Developer Toolbar (WDT) extension for Firefox. (If you haven't installed it yet, now's the time to download and install it. I understand there's already a Google Chrome version of the WDT, but in my opinion, it's nowhere near its Firefox counterpart.)

Once you're running Firefox with the WDT already installed, go back to the 24-column demo page, and scroll down to the very bottom. You'll see the two groups of boxes I showed you a while ago—different-sized, yet fitting together to form this last section of the demo.

Now check out the HTML code for this section:

<div class="grid_12 push_12"> 
    <div class="grid_6 alpha"> 
        <p> 
            230
        </p> 
    </div> 
    <!-- end .grid_6 .alpha --> 

    <div class="grid_6 omega"> 
        <p> 
            230
        </p> 
    </div> 
    <!-- end .grid_6 .omega --> 

    <div class="clear"></div> 

    <div class="grid_1 alpha"> 
        <p> 
            30
        </p> 
    </div> 
    <!-- end .grid_1 .alpha --> 

    <div class="grid_11 omega"> 
        <p> 
            430
        </p> 
    </div> 
    <!-- end .grid_11 .omega --> 

    <div class="clear"></div> 

</div> 
<!-- end .grid_12 .push_12 --> 

<div class="grid_12 pull_12"> 
    <div class="grid_1 alpha"> 
        <p> 
            30
        </p> 
    </div> 
    <!-- end .grid_1 .alpha --> 

    <div class="grid_11 omega"> 
        <p> 
            430
        </p> 
    </div> 
    <!-- end .grid_11 .omega --> 

    <div class="clear"></div> 

    <div class="grid_6 alpha"> 
        <p> 
            230
        </p> 
    </div> 
    <!-- end .grid_6 .alpha --> 

    <div class="grid_6 omega"> 
        <p> 
            230
        </p> 
    </div> 
    <!-- end .grid_6 .omega --> 

    <div class="clear"></div> 

</div> 
<!-- end .grid_12 .pull_12 --> 

<div class="clear"></div>

Compare it again to what you see on the demo page.

What's happening here? Shouldn't the first group of boxes (230-230-30-430) be shown before the last group (30-430-230-230), as in the markup?

Well, that's the power of the push_xx and pull_xx classes. But before we go into them, go to the WDT, click the Information button, and choose Display Div Order, just to make sure that you're correctly seeing how the CSS affects the markup.

web developer toolbar's display div order command chosen

Here's a screenshot of what you should see:

bottom section with display div order command activated

I needed to show this to demonstrate that the two groups are divided into left and right sides, and not top and bottom. That perception error is easy to make (as I did) because: (1) we're used to seeing div groups that stretch the whole 960px width; and (2) the two groups have similar-sized boxes that are easy to confuse with each other.

(Nathan Smith, the 960gs creator, could have probably used boxes with different sizes—e.g. 70-390-190-270 and 230-230-30-430—to achieve the same effect and would have avoided the potential confusion, but he didn't....)

But now that you've seen how the first group (as it appears in the markup) was “pushed” and how the second group was “pulled” by these classes, check out the CSS to see how they're doing it:

    
.push_1, .pull_1,
.push_2, .pull_2,
...
.push_22, .pull_22,
.push_23, .pull_23 {
    position: relative;
}

...

.container_24 .push_1 {
    left: 40px;
}

.container_24 .push_2 {
    left: 80px;
}

...

.container_24 .push_22 {
    left: 880px;
}

.container_24 .push_23 {
    left: 920px;
}

...

.container_24 .pull_1 {
    left: -40px;
}

.container_24 .pull_2 {
    left: -80px;
}

...

.container_24 .pull_22 {
    left: -880px;
}

.container_24 .pull_23 {
    left: -920px;
}
        

First, giving these two classes to HTML elements positions those elements relatively, so that we could move the divs to the left, right, top, or bottom relative to where it would normally occur in the document. (More on CSS positioning here.)

Next, in combination with the container_24 class, the pull_xx classes give the div a negative left padding, which makes it possible to “pull” the div's content to the left. On the other hand, the push_xx classes, as expected, does the opposite and gives the div a (positive) left padding to “push” its content to the right (by giving way to the left padding).

bottom section with display div order command activated

“But why the hassle?” you might ask. “Why not just put them in the correct order in the markup in the first place, so you won't have to use these unnecessary classes?”

Good questions. The answer lies in the pursuit of having semantic and accessible markup—our designs should not force the markup to a structure that doesn't make sense or isn't up to standards when the stylings are turned off. And CSS has been proven to handle such situations elegantly—it lets us achieve the look of our designs regardless of how the markup was written (well, largely).

In the 960gs site, Nathan Smith shows the header as a good example of how he used these classes:

960.gs header

On the surface, we might think the markup will show the Twitter logo first, then the Download link, and finally the 960 logo. But that wouldn't be semantic—the title of the site (i.e. 960 logo) should come in first. And as you probably know, this arrangement also has SEO benefits. So, the markup for the header actually goes something like:

<body> 
<div class="container_12"> 
    <h1 class="grid_4 push_4"> 
        960 Grid System
    </h1> 
    <!-- end .grid_4.push_4 --> 
    <p id="description" class="grid_4 pull_4"> 
        <a href="#">Download</a> - Templates: Acorn Fireworks, Flash, ...
    </p> 
    <!-- end #description.grid_4.pull_4 -->    
    

As you can see, the logo does come in first, and after it, the download link. (The markup for the Twitter logo is found after the footer, was given an id of twitter, and is absolutely-positioned. It wasn't given a 960.gs class, so we won't concern ourselves with it.)

You also saw in the markup (as predicted) that the logo was pushed and the download link section pulled. To visualize it more clearly:

960.gs header labeled with classes

And that's how you use the push or pull classes—know that they either give your divs a negative or positive left padding, then “pull” or “push” your content according to the number of columns you need your content to be pulled or pushed.

There's one last set of classes that are integral to 960.gs—and they let you create complex layouts. A column that spans several rows, for example. Let's tackle them next.


alpha and omega Classes

If you've read tutorials or articles on 960.gs before, you probably already know by now that the alpha and omega classes cancel the horizontal paddings set by grid_xx classes. And most likely you also know that their primary use lies when you have grid_xx classes inside nested divs.

For the benefit of those who don't know yet, let's go to our CSS and see what these classes do to the elements they are assigned to:

.alpha {
	margin-left: 0;
}

.omega {
	margin-right: 0;
}
	

Pretty straightforward—they simply zero out the left (alpha) and right (omega) margins. And as we've seen a while ago, when we assign an element a grid_xx class, we automatically give it horizontal margins of 5px on both sides. With nested divs, we don't want to double these margins, so we give an alpha or an omega class, or both, accordingly.

bottom section div group showing alpha and omega classes

A nested div that's touching the left edge of its parent div would be given the alpha class. Similarly, the omega class is assigned to the nested div that's placed on the parent div's right edge. But what if we have a nested div that touches both edges of its parent div? That's right, we assign both classes to it.

Let's move on to an example so that you can see how it's done.

Though not shown in the 960.gs demo, here's an instance of how a complex layout is achieved with the aid of the alpha and omega classes (and nested divs with grid_xx classes):

blocks of content to demonstrate alpha & omega and nested divs

Here we have columns that span several rows on both sides, with rows and boxes in the middle. You can also visualize it as a typical 3-column layout; but for our example, we're just using 15 columns. Of course, you can easily expand it to 24 columns.

The key to creating layouts like these in 960.gs is to:

  1. Remember that 960.gs makes the layout possible by floating divs to the left.
  2. Create your nested divs from those initial floated divs—. This means you'll have floated divs within floated divs.

Here's one way of approaching our layout: group them into three columns first, and assign them the appropriate grid_xx classes:

blocks of content to demonstrate alpha & omega and nested divs

Next, assign the additional grid_xx classes for the nested divs (note that we don't have any nested div for the right column):

blocks of content to demonstrate alpha & omega and nested divs

Since we have at least two levels of grid_xx classes inside nested divs, we also need to add the alpha and omega classes appropriately:

blocks of content to demonstrate alpha & omega and nested divs

The nested divs inside the left column touches both edges of its parent div, so we need to add both alpha and omega. The same holds true for the divs with grid_8 classes in the middle section. But each grid_4 div on top only has to have alpha or omega, since it only touches either the left or the right edge of its parent div.

As you may have concluded from this simple example, you can nest divs with grid_xx classes as deep as you want (if your design demands it), as long you correctly mark them up, and give them the right 960.gs classes, so that they are floated correctly and any excess margins are canceled.

And speaking of floats, the last group of 960.gs classes, though not unique to 960.gs, make it all possible—they clear the floats that are automatically created when you assign a grid_xx class.


Leveling the Field: The clear Classes

Earlier, we noticed this in the markup—every div that was given a grid_xx class, that was also the last div for its row, was followed by an empty div with a class of clear.

    
<div class="grid_5"> 
    <p> 
        190
    </p> 
</div> 
<!-- end .grid_5 --> 

<div class="grid_19"> 
    <p> 
        750
    </p> 
</div> 
<!-- end .grid_19 --> 

<div class="clear"></div> 

<div class="grid_6"> 
    <p> 
        230
    </p> 
</div> 
<!-- end .grid_6 --> 

<div class="grid_18"> 
    <p> 
        710
    </p> 
</div> 
<!-- end .grid_18 --> 

<div class="clear"></div>
    

The no-brainer reason for this is that we need to clear floated divs, because once we float them, they no longer take up space, causing the elements below it to be “pulled up,” which ultimately leads to a broken layout.

As we've seen in the demo, a solution for this potential problem is to place an extra non-semantic div with a class of clear, which does the following:

.clear {
    clear: both;
    display: block;
    overflow: hidden;
    visibility: hidden;
    width: 0;
    height: 0;
}
    

The code above is basically Nathan Smith's own solution to the problem, as discussed in his blog. A lot of web designers don't have any issues with it, except probably for standardistas who might cringe at the thought of using extra non-semantic divs in the markup for a styling problem.

Thankfully, Nathan Smith also included the clearfix solution in the 960.gs CSS, first discussed on PositionIsEverything.net. It does away with the extra div, as you can place it alongside the grid_xx classes and achieve the same effect:

<div class="grid_5"> 
    <p> 
        190
    </p> 
</div> 
<!-- end .grid_5 --> 

<div class="grid_19 clearfix"> 
    <p> 
        750
    </p> 
</div> 
<!-- end .grid_19 --> 

<div class="grid_6"> 
    <p> 
        230
    </p> 
</div> 
<!-- end .grid_6 --> 

<div class="grid_18 clearfix"> 
    <p> 
        710
    </p> 
</div> 
<!-- end .grid_18 --> 
    

That's the same example markup above with the extra divs removed, and the clearfix class added. It will do the same thing, so you can choose this method of clearing if you find it to your liking. Here's the CSS for it:

.clearfix:after {
    clear: both;
    content: '';
    display: block;
    font-size: 0;
    line-height: 0;
    visibility: hidden;
    width: 0;
    height: 0;
}
/*
The following zoom:1 rule is specifically for IE6 + IE7.
Move to separate stylesheet if invalid CSS is a problem.
*/

* html .clearfix,
*:first-child+html .clearfix {
    zoom: 1;
}
    

The code might be a bit different from what you're used to. This is because Nathan Smith based it on a blog entry by Jeff Star, which supposedly updates the original clearfix hack, to do away with code intended for a browser that's now extinct (i.e. IE for macs), and tweaks it for newer ones (i.e. IE6 and IE7).


Conclusion

Using just the 24-column demo of 960.gs (and in some instances, the 960.gs site itself), I've shown you how each of its classes work and how you could use them in converting your 960-based designs into HTML and CSS.

Every section in the demo imparts lessons to be learned, and once you see what the classes do to your markup by examining the CSS, the mystery of 960.gs vanishes, and you gain a better understanding of what happens behind the scenes. You might even find new ways of using the classes, since you now know what they do.

Applying your newfound knowledge becomes easy, because once you've set your columns using 960.gs, you'll just have to assign id's to the divs (as the situation warrants) as hooks to further adjust the divs' paddings or the sizes of its text inside.

Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://laroouse.com edurup

    very good tuts thanks a lot

    • Prionkor

      I am familiar with the 960gs system for quite a while now. But I was wondering how long we will hang on to pixel based model rather than go to percentage based model. I am confused about that. the 1024 px wide monitor is dying now even in third world countries. In my country lots of people using widescreen and no one importing these monitors.

      So i think i may be a good time to move on to percentage based design where the side will fill up the width of the monitor rather than leave a lots of space. Even tutsplus using percentage based measure on there column (i guess).

      Please let me know what you think. :)

      • Patrick

        This won’t happen in the near future. And the reason is simple:

        Netbooks, Smartphones, embedded devices and so on. They’ll support this resolution for some time. Next reason is advertising. Most of all advertisers want that their ads looks on all sites in the same way.

  • Huckleberry

    Great Tut. Love the 960 grid system. Especially effective if converted to a fluid format—rather than static.
    Huck.

  • http://www.broof.de BroOf

    Very detailed and absolute perfect for beginners who want to learn how to work with grid systems!

  • w1sh

    Shameless plug: http://960ls.atomidata.com/

    Btw, thanks for not choosing my tut. This 5th or 6th look at how to use a CSS framework is much better.

    • Jacob

      You make these rash un-needed comments on nearly every tutorial posted. If yours was not accepted, too bad, either it was lacking in quality or clarity or they just did not want it. In the end if you don’t like this free service ( I subscribe to the premium membership because I think Jeff and the other envato sites deserve some income ) then bug off and go bum knowledge elsewhere. But either way, please stop posting.

      *It may be advertising, but regardless he did spent at least a few hours producing clear, quality content and sample images.So everything you have said has no basis nor does it contribute/thank the site. So once again, bug off.

      • w1sh

        I’m so sorry Jacob. I didn’t mean to offend you. Are you okay? Do you have family with you in this time?

      • http://webdesignbysteve.com Steve

        I thought that the plug from w1sh was rather informative, and fits well with this article. I appreciate it, and may use it for web development.

  • http://brianegan.com Brian Egan

    Great writeup! I hadn’t gotten into using the Push/Pull classes yet, but that’s now on my to-do so I can improve the accessibility of my site a bit.

    Thanks for the info.

  • http://stembimo.com/ Parth

    I was looking for something like this a few days ago. Thanks!

  • rishwan

    The 960 Grid System is my number one choice in web development. Have been using it with almost all my projects.

    I salute Nathan Smith for the beautiful piece of work and thank you Nettuts for detailing it further.
    I mean, really this is a promised framework that would cut development time by half for sure.

  • http://hammystudio.com Stephen Hamilton

    Very succinct yet thorough tut! I love 960 and use it in many of my projects and this definitely helped me become even better acquainted with the framework. Thanks!

  • Dave

    Nice tut. Thanks for the info on pull/push

  • http://www.503websolutions.com Jason Schmidt

    Thank you for the detailed write up. I’ve used 960gs a couple of times. This TUT showed me things I didn’t know about.

    Thanks!

  • http://pixelcoder.co.uk Alistair

    I did a lot of comparisons before commiting to a framework. Even if 960.gs becomes obsolete it’s plentiful and powerful enough to serve my client sites for a lengthy time to come. It’s something you can keep and use in the future.

    It’s learning curve is very shallow, took me 20 minutes to get the idea and start implementing. A great framework if you have sound knowledge of CSS for anyone.

  • http://berkomputer.com Berkomputer

    great tuts, i know it from reading the source file but never using push and pull in actual project ^^..
    been wondering, is there any framework for wider screen..?

    • http://pixelcoder.co.uk Alistair

      i thought pull was gonna be a great feature by thinking you could jump rows as well as columns.

      Say a 24 columns (where grids are columns) if you wanted to pull the last column to be before the first you would think pull_24. unfortunately this will not work unless i’ve got it wrong. You can only pull or push past those items in the same row.

      Found this a bit of a bummer.

  • http://www.design-vibe.co.uk Web Design Norwich

    Awesome article, i found this a really great read and very helpful.

  • nadeem

    nice work wanted to learn this framework in these day , and with this article its gonna be easy

  • http://dmitry-scriptin.blogspot.com/ Scriptin

    I used a Blueprint framework for a while and just didn’t know how does 960gs work. Now it seems more flexible than Blueprint, primarily because of .alpha and .omega, which allow you to safely put blocks into others.

    Also, .push_XX and .pull_XX are much more semantic, but it is possible to do the same in Blueprint in more complicated way with .prepend-XX and .pull-XX classes respectively.

    But there are benefits using Blueprint – you can generate various-sized grids with Ruby scripts.

  • http://sonspring.com/ Nathan Smith

    Hi. I made the 960 Grid System. Quite a comprehensive article, I couldn’t have said it better myself!

    Just one small correction regarding Google Chrome. To view source in Chrome on OS X, just press:

    Option-Command-U

  • http://sonspring.com/ Nathan Smith

    I apologize for the double-post. One more point of clarification:

    The 12 and 16 column versions give you 940px of usable space.

    The 24 column version gives you 950px of usable space (same dimensions as Blueprint).

  • http://webkicks.dotink.org Matthew J. Sahagian

    “If you’ve only used 960gs before for Photoshop mockups, consider this your lucky day.”

    ——————-

    And let’s hope that’s all anyone ever uses it for! Using the provided CSS of a grid system produces some of the least semantic, most outrageous, and downright unmaintainable code I’ve ever seen. As far as fixed width sites go, by all means, treat yourself to the 960 templates and design your sites based on their concepts of spacing / grids. But please, when you sit down to write your markup, don’t even think about using any of these classes.

    • http://www.jeffrey-way.com Jeffrey Way

      I disagree.

      • http://webkicks.dotink.org Matthew J. Sahagian

        I guess it comes down to one’s definition of what it means to be semantic. I don’t add classes to my HTML for the sake of styling, I add classes to increase semantic value. A div is not just a div, it is perhaps a header, or a nav, or whatever — this is the whole emphasis of HTML5 and why they are introducing new elements.

        Classes such as “wide”, “two_column”, “three_column”, “large” are throwbacks to early HTML where elements were used for purely stylistic purposes… such as b. These elements had no true semantic value and HTML5 is struggling with simply redefining some of them with a semantic value in order to get this point across.

        Grid systems use classes that are just shy of this, “grid_8″ has absolutely nothing to do with my data, it is purely a stylistic concept, and when you get into “push”, “pull”, “alpha”, “omega”, these things are even worse.

        If I want my header to be 940px wide with 0 margins, then I will apply that styling to a class of header… if I want two articles side by side and need to give them 48% width, padding 1%, and float them left, I will give them a class of article and style articles in such a way where it is meaningful.

        I understand the point of this shortcut methodology, but realistically it is detracting from semantic markup. When I want to style something I’m supposed to think “Oh, CSS File!!!” — grid systems break this, now if I want to change the style of something (at least as it relates to width and placement) I have to go into my markup. You might as well create strings in whatever scripting language you use and dump them into inline styles. The *ONLY* difference between the two is at least with a grid system you can override it with a more specific CSS selector and/or a later define one with equal specificity, where as inline you absolutely have to go to the markup. Keep in mind, however, if you do such a thing, you break the entire point of the grid system and your grid classes now become extremely useless.

      • http://webkicks.dotink.org Matthew J. Sahagian

        On one additional note… you may believe that the benefit of this outweighs the negative/messy/non-semantic aspects of it — and you’re more than welcome to do that, but simply because you believe the benefit outweighs it does not make it legitimate practice or best practice.

        Just as if you decide to use an insanely easy to use framework that achieves it’s ease of use and rapidity through layers and layers of abstraction thereby making it slow… you can say the benefit outweighs the negatives, but you cannot deny it is slow and bloated.

        Do the benefits of grid systems in terms of fast/easy page layout outweigh the lack of semantic value, the detrimental effects on code separation, and the counters to other developers/designers expectations? I don’t believe so, and perhaps you do, but I think it’s very difficult to deny those aspects of it with a straight face.

      • http://www.vagrantradio.com Jason

        As do I.

      • Patrik

        @Matthew J. Sahagian

        I could not agree more. The idea behind this grid system is good but it’s just too bloated with empty elements and classes that doesn’t say anything that has to do with the data it contains.

        Semantics are very important and this is a fact that one should not ignore.

    • http://sonspring.com/ Nathan Smith

      @Matthew:

      Without wanting to sound disrespectful, to put it bluntly, you misunderstand the term “semantics”. The “big-S” semantic web isn’t even about CSS, class, or ID names…

      http://en.wikipedia.org/wiki/Semantic_Web

      From that article:

      “Semantic HTML refers to the traditional HTML practice of markup following intention, rather than specifying layout details directly. For example, the use of denoting “emphasis” rather than , which specifies italics. Layout details are left up to the browser, in combination with Cascading Style Sheets. But this practice falls short of specifying the semantics of objects such as items for sale or prices.”

      “Microformats represent unofficial attempts to extend HTML syntax to create machine-readable semantic markup about objects such as retail stores and items for sale.”

      Note that “semantic” value is derived from class names, only when there is an agreed upon pseudo syntax, such as with Microformats. But ID and class names in and of themselves to not convey semantics.

      What do, however, are the new additions in HTML5. Tags like header, footer, aside, etc. are what are adding more semantic value beyond the generic classics like div and span (which are inherently semantically meaningless, by definition).

      Semantics are more about proper use of markup. For instance: Using a P tag for a paragraph, instead of faking it with use of two BR tags. A good way to think about it is: Would this markup change the way a screen reader interprets the message? For instance, using STRONG for emphasis instead of just the B tag for visual boldness, etc. If the answer is “No” as with ID or class names, then you’re not talking about “Semantics” in the way it’s meant to be understood.

      Anyway, I say all this not to make you feel bad. Just wanted to clear up a (surprisingly common) misconception amongst people who are getting their start in web design. There are far more important things to worry about than what you call your class names. As long as it’s maintainable for an individual or team, that’s really all that matters.

      Now, if you really think using 960 is “unmaintainable” then that’s not something I’m going to argue. That’s all in the eye of the beholder. For me, it makes sense. But then again, I’m biased having created it. For others, it seems to make sense too.

      If you don’t like it, nobody’s making you use it. Nobody’s making you talk about it. It takes far less energy to say nothing than to leave a snide comment. And it saves me the energy of having to refute disinformation. Everybody wins.

      • http://sonspring.com/ Nathan Smith

        Ugh. The comments field ate my reference to [EM] and [I] tags. Sorry for the needless italics. Hopefully it’s still (mostly) legible and understandable.

      • http://webkicks.dotink.org Matthew J. Sahagian

        @Nathan

        I had a longer comment, but it does not appear to have gone through, apologies to the moderators if this is a partial dupe. Rather than go into the full explanation again, let me keep it simple:

        The W3C disagrees with your interpretation/understanding of classes and semantics:

        http://www.w3.org/QA/Tips/goodclassnames

        The short of it is, your classes might as well be “width_60″ “width_320″ or whatever other divisions you happen to call “grid 1″ vs “grid 10″ — Simply because you have changed the term width to grid, and a pixel count to some multiple of a base size does not resolve the issues you are creating here.

        Regardless of semantics, the grid system CSS still completely fails at code separation — your style is in your markup, in order to change your style, you have to change your markup when using a grid system.

        I am not “just getting started” in web design… nor is my interpretation wrong. My interpretation is the only logical conclusion one can reach with even the most basic understanding of semantics (outside of buzzwords that is) and code separation.

        For you, the benefit of 960gs (fast layout development, consistent spacing without thinking, etc) outweigh the negatives (lack of semantics, disrespect for code separation, messy code). For me they do not.

      • Chris Sanders

        I am actually in agreement with Mathew on this one. Although I believe one could argue the value having this grid system in place especially for big HUGE projects with many people doing the front end development on them. It simplifies the way general layouts are handled. Additionally, I always tell designers I work with to learn how to use the 960 framework to help them with their designs. However, I appreciate you taking the time out to create this framework and to post here on this form to explain it to us. :D

  • Charles

    I always knew it was easy, but never seated down to really try and understand it. Thanks for making it even more easy to understand with this step-by-step.
    Also, it lead to some very interesting readings about clearing floats. Just when you think everything is invented, someone comes up with some dead-simple one-liner piece of code that makes everyone happy.

  • http://www.jsxtech.com Jaspal Singh

    NIce tutorial.
    Thanks for sharing.

  • http://www.aediscreative.com Christopher

    I use to use 960.. I think its a great framework. Using blueprint with compass now though. is 960 packaged with any Sass setups?

    • http://jonathanclem.net Clem

      There is a plugin for using 960 with Compass, which I use on most of my projects. It’s ridiculously easy to use and set up. Just google it—it’s just as simple as installing a ruby gem. I think it’s on Github.

  • Roger

    Thanks for the very detailed tutorial. It pushed me to look at the code and really understand how a grid system works. There is one tiny correction. “the alpha and omega classes cancel the horizontal paddings set by grid_xx classes.” needs to have ‘paddings’ replaced by ‘margins’ as the code snippet that follows shows. The 960 grid system makes for very efficient css, and it would certainly help me with nicely proportioned layouts. I’m not a convert yet, but maybe I’ll try it out on my next site redesign.

  • http://www.designkanya.com Design Kanya

    I had been looking for a comprehensive article detailing out on the 960gs. I got one here finally. Thank you Jeff & Roydee for bringing in this much needed tut.

    Keep the good work coming.

  • Pop

    hey thanks……

    a great tutorial..
    and a grt help for the beginers….

    gud work

  • http://webkicks.dotink.org Matthew J. Sahagian

    And just for everyone else, here is an article that actually addresses the reality of 960gs and for that matter any other grid systems, please read it before jumping right in, note the cons regarding divitis, because if you want something as simple as borders, that’s what you’re gonna get!

    http://blog.aquabirdconsulting.com/?tag=960-gs

    • http://sonspring.com/ Nathan Smith

      @Matthew

      (I’m replying here, even though this reply pertains more to your comment further up, since this commenting system only goes so many levels deep…)

      First off, I’m sorry if I offended you by implying that I thought you were “just getting started” in web design. I just drew that conclusion since you were leaving dissuading comments on a tutorial site, the frequenters of which are typically people getting started in web design.

      I hear all your concerns, but again I think we’re talking about issues maintainability, not overarching semantics. That’s not to say anything you brought up is not valid. Yes having a set of class names that no longer mean anything after a site is overhauled is a problem. Yes, div-itis taken to an extreme can add page weight, etc. But again, the div tag itself is semantically meaningless.

      The W3 page you linked to (which I agonized over myself when first learning about CSS) encourages readers to “use class names with semantics in mind” (a suggestion, not a mandate)…

      http://www.w3.org/QA/Tips/goodclassnames

      Again, this is about maintainability. Choosing good class names can lessen impact of a sweeping change that would negate the value of an “unsemantic” class name. The underlying crux of that W3 tip is: Keep your pages maintainable. Choosing class names is an exercise in future proofing. Having “semantic” class names is a means to an end: maintainability. It’s not the goal in and of itself.

      I certainly wouldn’t recommend anyone use class=”bluetext” or class=”redborder” (W3 examples of bad class names) throughout the content of a site. That would be a pain to weed through and change tons of pages and/or blog posts.

      However, when building a site, a grid system is used (or at least should be used) at a much higher level. If the layout of a site changes, I’d hope that the so-called outrageous grid_XX class names would live in no more than a handful of templates. Make a few tweaks, and the change takes place site-wide. To me, that’s pretty maintainable.

      But again, maintainability is in the eye of the beholder.

      One thing I would say, for people who want to use 960 but are bothered by hair splitting over semantics: Rename the classes to whatever suits your fancy.

      It’s open source. It’s free. Fork it. Rework it.

      Or, don’t use it. That’s always an option too.

      • http://webkicks.dotink.org Matthew J. Sahagian

        @Nathan

        Your response completely sidesteps the point.

        It is well understood that it is not a mandate. Very few things are a mandate as is expressed by the fact that pages with non-semantic class names, non-semantic markup, and often times invalid markup render perfectly fine. No one is forcing people to use semantic class names.

        Your point on templating is well understood, but it does not resolve the issue. Whether I use a class once in one page, 2 times in one page, or 5 times each in 20 different pages only measures the depth of unmaintainability — it does not resolve the fact that the approach in and of itself is the cause of maintenance overhead.

        With regards to my role and purpose of these comments, it is precisely because many of these people are newer that I make them. There is no warning on this article (unlike the article I linked to which points out the negative aspects). Notice the article I linked to didn’t say DON’T USE IT! — it said, these are things you should be aware of, and marks against it.

        An article which fails to do that sets precedent for bad practice, which I think is unfair to new developers who look to these articles as “tips from the pros” so to speak. I think it would be nice if the pros started to emphasize points on good practice and as I said, present it in a way of questioning whether or not the benefit outweighs the negatives.

        Renaming the class to something more semantic is not possible. The purpose of the class is to style the element and more specifically to do it in a re-usable and broadly applicable fashion — to make the classes more semantic would destroy the entire function of the 960gs, at which point you might as well not use it at all, but just apply your own width’s and margins to your own truly semantic class names (i.e. what people like me do). Does this take more time? YES! Sometimes the right way to do something is not always the fastest or the easiest.

        I recently gave a talk on semantics, code separation, in light and with regards to HTML5 and CSS3 — when I brought up my default stylesheet which features classes like “first” and “last” I made a clear point that these added no-semantic value, and were strictly added for styling purposes because all current version of IE do not support :last-child.

        The reason that these class names are bogus is clear… the first element is obviously the first element, the last is the last, adding such classes seems useless and would be in an ideal world where IE didn’t hold us back. I didn’t, however, sit there and say “oh, you don’t need to worry about that, semantics is just a good idea not a mandate”… I said, “as soon as proper CSS selector support moves beyond this, these classes will be the first to go.” They are a case, for me, where the “benefit outweighs the negatives,” but I recognize and point out the negatives because failing to do so would set an ugly precedent for bad practice.

        The key difference between those classes, however, and the grid system classes, is that although they are redundant and do not add semantic value — they are not indicative of style, nor is any style inherently tied to them. The grid system classes avoid being indicative of style by using simple word/number swaps in the class name (a sleight of hand trick)… they however fail when it comes to being independent from the style, as the style is not editable without breaking the paradigm.

        No mandates here. My original remarks were that we could HOPE people were only using 960gs for photoshopping and comps, having looked at the source for just a few of the “used on” example sites linked from the 960gs site, my message becomes distinctly clear, and I would encourage all new developers reading these comments to go look at those sources and determine for themselves whether or not the benefit outweighs the negatives.

  • David

    Thanks for a very well-written article.

  • http://mikebarnhardt.com Mike Barnhardt

    This article would be perfect if it also went into some detail about how to work around styling 100% width backgrounds. Most people just throw at the top of the page which really limits what you can do as far as styling is concerned.

    Maybe that can be “Mastering 960gs 2: Semantics and Styling”? This can address the “divitis” buzzword naysayers seem to throw around as well as how to semantically write the HTML to allow freedom while still using 960gs to it’s full potential.

  • http://dangermoose.co.uk flashmac

    I always thought the sole purpose of CSS was to seperate markup and styling?

    If I understand grid systems correctly, the class names in the markup are actually styles. For example, If I wanted to change a div from 6 columns to 7, I would need to change the markup from ‘grid_6′ to ‘grid_7′.

    So to re-iterate, the styles are now inline and i’m pretty sure even nettuts would discourage inline-styles right?

    Of course, I like the grid concept, just web school taught me differently.

    • http://webkicks.dotink.org Matthew J. Sahagian

      @flashmac

      Nathan Smith (the creator) and I are having essentially this precise debate above if you are interested in reading it, but yes, you are right, styles are essentially inline.

      And for the record, “web school” taught you correctly.

      • http://sonspring.com/ Nathan Smith

        @Matthew

        Note: This will be my last reply.

        Again, commenting here, because nested comments don’t go more levels deep.

        I’m not trying to “sidestep” anything. But I do feel like I’m just talking past you.

        I don’t think our discussion is really going anywhere constructive. It’s clear to me now that you’ve made up your mind, perhaps even before this blog post was published. Fair enough. You’re certainly entitled to your opinion. I feel like I have summarized my thoughts as much as possible, without just repeating the same arguments I’ve made before, on other tutorial sites discussing the 960 Grid System.

        I’ll just offer one parting piece of advice: As you progress in your career, try not to lose sight of pragmatism because you’re being dogmatic about code. I can’t emphasize that enough.

        Here’s the kicker: Clients don’t care. They (and other developers) want someone who can do work on-time, on-budget, and is pleasant to work with.

        Yes, experienced designers need to know how to write CSS by hand, and use (if at all) a framework as a tool, not a crutch. The same could be said of jQuery, but many designers are quick to add it to a project without so much as a second thought. All I’m saying is if similar gains in efficiency can be had via a CSS framework, then it’s something worth considering.

        HTML and CSS exist to facilitate a site, not the other way around. Next time you find yourself viewing the source of someone else’s site: Ask yourself, are you doing it to learn, or to start a debate?

        I used to be like you, obsessing over code nuances to a fault, lording “semantics” and validation errors over peers. That’s why I tried to offer clarification initially, hoping to save you (and others who might read this thread) the wasted time and effort. Ultimately, it’s about what you can create, not about chiding others for trying to be more productive.

        Doing so wastes not only their time, but yours as well.

      • http://www.giulianoliker.com Giuliano

        After reading this small debate I would say both of you are correct because I just can’t render Matthew’s comments as incorrect. IMHO for beginners and those who don’t want to “waste” time writing CSS I would recommend 960 always. For experienced designers/developers who enjoy writing CSS and have sufficient knowledge to do it I would always recommend to start with empty CSS document.

        Thanks for informative debate guys.

  • http://www.mielkeway.de Alexander

    Awesome tut, awesome grid system. Thanks!

  • http://www.jauhari.net/ Jauhari

    This is what I want.. 960.gs is my favorite css framework

  • http://webdesignbysteve.com/blog Steve

    WOW – this has become quite controversial, speaking of Matthew J. Sahagian, and Nathan Smith.

    I have used Blueprint – http://blueprintcss.org/ for 2 websites now, and simply LOVE IT!! I think the best thing about 960 grid systems, is the ability to resize content area on the fly; all you gotta do is reduce one area’s div, and increase the other(s) that lay in the same row by changing their numbers.

    And from the W3C link that Matthew supplied: “An advantage of using CSS is that you won’t have to change much in order to change the looks of your website.” The 960 has great advantages, and that’s what CSS is all about. I plan on continuing using Blueprint – I feel that HTML 5 doesn’t offer the time savings as much. But then, I haven’t used it yet, nor do I plan to any time soon.

    • http://webkicks.dotink.org Matthew J. Sahagian

      @Steve

      I am able to resize my content areas on the fly as well without 960gs or any grid system. I change the width property in my CSS on the appropriate selectors, reducing one, and increasing the other(s).

      The w3c link I supplied has nothing to do with HTML5 in particular, it is a general article about class name conventions in all markup.

  • http://webkicks.dotink.org Matthew J. Sahagian

    @Nathan

    I think I have made the reason for my comments clear enough.

  • http://oricosolutions.com Orico Solutions

    The 960.gs framework really does save time! Used it first with a downloaded template and subsequently I am now using it in my new current project!

    Thanks 960.gs!

  • http://www.antonagestam.se/ Anton Agestam

    Did not know about the pull and push classes, that will come in very handy! Thanks!

  • Paul

    “the pull_xx classes give the div a negative left padding, which makes it possible to “pull” the div’s content to the left. On the other hand, the push_xx classes, as expected, does the opposite and gives the div a (positive) left padding to “push” its content to the right (by giving way to the left padding).”

    Unless I’m missing something, the negative and positive positioning values for the “pull” and “push” are not padding. Looking in firebug on the layout tab the grids in question have no padding.

  • http://krike.cmstutorials.org krike

    Thank you :) just what I needed

  • http://thedevelopertuts.com thedevelopertuts

    Cool tutorial, and interesting debate. But in today’s crazy world, there is one concern that seems to be the most important for clients ( from a freelancer’s perspective ): time to develop. If you get the website done in small time, you get the recognition and money. In the other corner, a well known designer and developer would create his own style rather than base upon a general framework.

    And optimizing css is another story, from my point of view.

  • Michael

    Awesomely clear, concise and complete!

  • http://saidur.wordpress.com saidur rahman bijon

    Very nice tutorial. Point out the major things of 960 grid. I was confused prefix and suffix . But now it’s clear to me. So thank for your well written .

  • Alex

    Very nice tutorial !
    Thanks for the grid concept !!!

  • Renobird

    2 excellent points of view presented by Nathan and Matthew – thank you for the debate gentlemen. The debate over frameworks will rage on – I look at it like this: Sometimes you need a hammer – sometimes you need a protractor – so you better know how to use both.

    Nathan Wrote:
    “Here’s the kicker: Clients don’t care. They (and other developers) want someone who can do work on-time, on-budget, and is pleasant to work with.”

    Agreed.

  • http://www.ramiro.org/ rg

    Very helpful tutorial tutorial, especially the section about using the alpha and omega classes, which opened my eyes, thanks.
    One thing I that confused me when reading the article was the usage of the word padding, as it was also used for margin and position offsets.

  • w1sh

    Grids r cool!

  • http://www.bullsprig.com/ John Sullivan

    I love the 12 and 16 grid, but the 24 is my new favorite.

    I know theres a fluid 12 16 grid. Is there a fluid 24 grid?

    Thanks for the great tutorial.

  • Justin

    I loved the tutorial, and I see some merit in both sides of the argument. However in the long run as long as the site is accessible, maintainable and can be done quickly to meet a customer’s budget the client will be happy. And interestingly enough clients pay me and not W3C. I am not saying throw all the standards out the window in favor of speed, but I don’t think the grid system is quite as detrimental as Matthew is portraying it to be.

    I have always written my style sheets from scratch and just used the 960 templates to help control my design layouts. I have also been losing a lot of skinning work lately to overseas developers who can underbid me due to the time it takes to do this. Actually using the grid system for skinning might allow me to speed up development and be able to keep more clients by paring the price down accordingly with my time savings.

    You both have absolutely valid points. I think it would be interesting to see a site that Matthew had marked up and styled and how it breaks down when the css is disabled (since we have seen several examples of how the 960gs code looks and how it breaks down). I don’t know if any of Matthew’s clients would like hundreds of developers tearing through source code and commenting on it, but I think it would be interesting to see.

    Anyway thanks to Roydee for the tut! And thanks to Nathan and Matthew for the lively and interesting debate!

  • http://andilicious.com Andi

    Cool tutorial. Thank you :)

  • Angela

    Great tut!, very comprehensive.. didn’t know about the alpha omega. I used to use my one clases for the same purpose.

  • http://www.gervet.net Gervet

    Very interesting tutorial, had long wanted to see one of 960grid and this is quite comprehensive.

  • Jim

    I found the debate between Nathathan and Mathew very helpful as I’m trying to decide whether or not to use a framework or to attempt to recode our sites in HTML5.

    As an Internet Marketer, I do care about the code and how that effects loadtimes and SEO. I wouldn’t be surprised if google decided to reward pages with semantic selectors as it would help them identify relevant user content, which I think is google’s primary mission.

    My thanks to both.

  • http://www.ilmukom.net feri

    thanks,
    love this framework