A Detailed Look at the 960 CSS Framework
videos

A Detailed Look at the 960 CSS Framework

CSS frameworks are bloated. CSS frameworks are for people who don’t know how to code. CSS is too simple to implement a framework.

If you’ve ever read a tutorial on a CSS framework, I can guarantee that many comments mimic the previous statements. My guess is that the majority of these comments are stemmed from slight ignorance. Once you take the opportunity to spend some time with 960, you’ll be amazed at how much time can potentially be saved when developing your web applications. At the very least, take ten minutes to review the framework. You can always press the delete key…though I doubt you will!

960 Framework

Pros

  • Rapidly speeds up development time.
  • Clean grid structure.
  • Not many browser inconsistencies. The ones you find can be fixed easily.
  • It’s not “bloated” as many people suggest. We’re talking 3-4kb here, folks! You would use many of these stylings anyways.
  • Build complex layouts quickly.

Cons

  • It’s named “960″ for a reason. If you’re hoping to use a different width for you website, you might be better off choosing a different framework.
  • As with any “framework”, you lose a bit of flexibility.
  • You didn’t create it. There’s something to be said for code being 100% our own.

Usage

Let’s imagine that we want to work with the “12 column” structure to create the extremely simple layout seen below. First, we must create a wrapper div that has a class of “container_12″. Notice the 12.

layout
<div id="container" class="container_12">
...content goes here
</div>

Specifying an id here isn’t required by any means. However, I find that it helps me to remember exactly what the div is. One of the gripes against 960 is that the classes do nothing to define what the element is. Simply including an id fixes that issue.

Grids

Now we want to create a simple header and two column structure. When first getting started, it’s helpful to examine the demo to choose how wide a grid you should use.

960 Framework

I’m going to choose a header width of “940px” (+ 20px margins = 960), a sidebar width of “220px”, and a main content width of “700px”.

You must assign a class to each div. Naming conventions require that that the class name begins with “grid_” and ends with the number of columns needed. In our case, we’ll use “grid_12′, “grid_3″ and “grid_9″, respectively.

<div id="container" class="container_12">
  <div id="header" class="grid_12">
    content goes here
  </div>

  <div id="sidebar" class="grid_3">
    content goes here
  </div>

  <div id="mainContent" class="grid_9">
    content goes here
  </div>
</div>

The only additional styling that I’ve added is background colors and a minimum width for each div to simulate an actual website full of text. I won’t go over that here; mostly because they should be removed. They’re only used here to demonstrate the structure.

Without worrying about margins, floats, or IE hacks, we’re able to create a layout extremely fast. The true power of 960 is demonstrated when building complex newspaper-like layouts. For more detail, be sure to watch the screencast above.

960 Framework

You Also Might Like

  • Prototyping With The Grid 960 CSS Framework`

    Prototyping With The Grid 960 CSS Framework

    Grid 960 is a CSS Framework that enables developers to rapidly prototype designs. They are excellent tools for creating mock ups. Why? Because they do all the heavy lifting allowing you to get faster results.

    Visit Article

  • Build a Newspaper Theme With WP_Query and the 960 CSS Framework

    Build a Newspaper Theme With WP_Query and the 960 CSS Framework

    WP_Query is a powerful tool to control what comes out of your loop. Today I’m going to teach you all how to use it to make a 3 columned newspaper theme that has all your main blog posts in the main column, and off to the side a set of posts with a certain category. We’ll be using the 960 CSS framework for the basic layout and reset of our theme, it will chop a lot of work off what’s needed!

    Visit Article

  • Which CSS Grid Framework Should You Use for Web Design?

    Which CSS Grid Framework Should You Use for Web Design?

    Ever wondered how all those slick “magazine” themes for WordPress and other platforms were created? Many, if not all, were designed using a CSS Grid Framework – at least in essence if not in actual fact. That is, you can use an existing CSS framework or build your own from scratch. While it’s possible to design complex web page layouts without a framework, it’s arguably an act in masochism. In this article you’ll get an overview of the current batch of Frameworks and which you should choose to use.

    Visit Article

  • Subscribe to the NETTUTS RSS Feed for more daily web development tuts and articles.


Tags: Videos
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://www.quickurl.biz halli
    • http://www.finallyanime.com FaS

      yEAH, it’s SOOOO great, I even used some of it to modify my original theme!!!! Check it out @ http://www.finallyanime.com! Thank you so much net.tuts. I come to your site like allllllll the time :D Keep up the good work!

  • http://www.graphicrating.com Andy Gongea

    You said it J : You didn’t create it. There’s something to be said for code being 100% our own.

    Custom made is always the best way to go.
    Cheers!

    • Michael

      I think this is absolutely foolish — if it helps then I don’t care if it’s not 100% my own. Unless you explain what exactly it is that is to be said for code being 100% your own, I’m going to assume that there is nothing substantive behind this comment.

      • Paul

        I agree, almost all of that CSS would be utilized anyway in some form. This seems an excellent way to rapid prototype for client site mockups and then quickly deploy them.

        Why would I want to pay someone to keep re-inventing the wheel?

    • Grayson

      There is nothing custom about reinventing standard grid layout; and its never the best way to go. You can however benefit from coding your own redundant CSS until you graduate from novice status.

    • J

      The value isn’t whether it did or didn’t write CSS for you, but that a clarified layout ideology is standardized at the onset, and that it lets you act on that ideology with nearly no rev time. Frankly, it almost doesn’t matter what that ideology is. Still valuable time savings.

      Like Grayson said, this isn’t the first time we’ve heard of a 960 grid for the web. It’s just a good tool-set to make it faster and simpler.

  • http://wpcoder.com/ Michael Castilla

    Great video Jeffrey. I thought the same about CSS Frameworks as you did, until I too checked out the 960 Framework myself.

    I’ve only started using the 12-column grid with a recent design I’ve been working on, and it makes designing so much easier. I love having guidelines to work with, and I know when I go to code it, it’s going to be so much easier.

    Thanks!

  • http://themeforest.net/user/JeffreyWay Jeffrey Way
    Author

    @Andy – I agree. You can always modify the 960 framework to make it your own.

  • http://themeforest.net/user/JeffreyWay Jeffrey Way
    Author

    But at the same time – I didn’t create jQuery and I use it nearly on every project.

  • http://www.donttalktorobots.com Doug Vander Meulen

    I have been using 960 or awhile now, and really like it. Its simple, easy to use, and lets you spend more time on things other than floats. While its not 100% “your own,” I don’t know of any project where I haven’t used other technology, inspiration, tutorials or the like to complete a project. 960 is not the end all be all to use on every project, but it’s a good tool to have in your back pocket.

  • http://james.padolsey.com James

    Great screencast Jeffrey!

    I’m one of those “slightly ignorant” commenters who slammed this CSS-framework initiative to begin with, but now I can see the appeal! I strongly agree you on the fact that people shouldn’t use a framework if they haven’t yet spent a decent amount of time with the ‘real’ language, whether it’s CSS, JavaScript, PHP etc.

    ps. Where’d you get that fake Apple dock thing?

  • http://themeforest.net/user/JeffreyWay Jeffrey Way
    Author

    @James – Yeah I know you’re against it; I was too for the exact same reason.

    Like I said, it’s not right for every application…but it’s definitely worth a deeper look.

    Do a google search for “Rocket dock”. It works very well. :)

  • Maxim

    Thank you for the tutorial. I was too lazy to read on my own but watched screencast while installing VS SP1.

    Thank you again!

  • http://broadcastingadam.com Adam Hawkins

    Good to see my article linked again :)

    • http://100-stories.com/ Kamrul Hasan

      That is a good one man. I will say that should be the first step to understand 960 grid system.

      I recommend every one to read that.

  • Pingback: Moleskine - 960 Grid System, Divine Proportion, Rules of Thirds | John Wang

  • http://erick.web.id erick

    another great info
    Thx

  • http://www.myinkblog.com Andrew

    Great perspective and screencast. You convinced me to give it a try! I end up spending way too much time making similar styles, why not save some time.

  • http://jstorimer.com Jesse

    Great tut Jeffrey.

    I share your opinion of CSS frameworks, although I prefer the the flexibility over Blueprint over the non-bloatedness of 960.

  • http://vintom.com Vin Thomas

    Sweet Screencast! I look forward to using this in some future projects.

  • http://www.pixelgraphics.us Douglas Neiner

    Well done.

    I will give it a try. Also, I keep forgetting to use google’s API for jquery, and end up always including it myself.

    Great screencast, and well done… just one more thing…

    The Dock on a Mac works better because… oh, right… its on a Mac. :)

  • Chris

    This is going to go great with a .psd template I recently purchased from Themeforest.

    I read the readme and the designer based his design around the 12 col 960 system.

    So i went and d/l and was a little confused, hopefully when i get out of class and have some time i’ll be able to watch the vid tut. =}

    always a pleasure reading your tutorials Jeff.

  • http://dev.iamntz.com Ionut Staicu

    I’m one of those who you mentioned first (css frameworks are useless). But watching your video makes me thinking seriously to give a try to one of these frameworks…

  • http://blog.insicdesigns.com/ insic

    960 is an awesome framework. I used it once and i cant stop using it in my projects.

  • http://www.buildinternet.com Zach Dunn

    I’ll admit I was definitely one of those people who didn’t see any merit in a CSS framework, but after watching this screen cast I can appreciate the idea a whole lot more.

    Thanks for the motivation to try it out!

  • Player

    Cool! I like it! I will try it on my next project! :)

  • http://www.eddywashere.com eddy was here

    thank you for the video

    i would have ignored it like all the other framework tuts if it wasn’t for the video.

    definitely going to start using this!

  • http://blog.brenelz.com Brenelz

    Maybe I’ll further have to invest in this. It would really help keep things in a grid format…

  • ajpalma

    I knew most of this stuff but watched it anyway to make myself feel better, besides its comforting, like watching the wonder years with the Daniel Stern’esque voice

  • http://themeforest.net/user/JeffreyWay Jeffrey Way
    Author

    @ajpalma – Thank you for saying that. I know exactly what you mean.

    I adore “The Wonder Years”.

  • http://harrymahardhika.com/ Harry M

    Great article. 960 is much easier to use than the other css framework such as blueprint css :D

  • http://scyberspace.com Rene Merino

    I love this screencast, I will definitely try 960 on my projects.

  • http://www.mediasky.de Shuuun

    Greeaat! I like Frameworks like jquery, but i never tried a css framework
    (i like to do my own things with the code) but i will watch this screencast when i am home from work, 7 hours 45 minutes to go :P

    Lets see if your knowledge about this framework can make me luuv it like jquery !

    (btw, we need more PHP tutorials =D )

  • http://macbruker.com Martin

    Great tutorial! This is a great introduction to 960 for webdesigners that did not know about the framework already.

    Just a comment on the order of the stylesheets. Because they are cascading, I think it makes more sense to change the order to this:
    - reset
    - 960
    - text
    - default

    What do you guys think?

  • http://www.raymondselda.com/ Raymond Selda

    Very nice screencast Jeff. I used Blueprint for a while but eventually switched permanently to 960. One of the things I love is the simplicity and intuitiveness of the framework.

    I must admit that sometimes I get confused between a prefix and a suffix when using Blueprint. hahaha.

    Thank you for this.

  • http://www.xqlusive.nl xQlusive

    960′s a great rapid framework. We use it often with much pleasure!

  • http://www.pcbymp.nl/mennopietersen ThaClown

    Love the new intro!

  • jitendra

    This Screencast is good . 960.gs is good but i like Blueprint more

    As i think we can save more time and rewriting process with Blueprint.

    because it has many Plugins, Typography styles, Form Styles and use of em for font-size(for better accessibility).

    960 uses px for font size

    I want to see Blueprint screencast like this

  • http://www.graphicrating.com Andy Gongea

    @Jeff

    JQuery isn’t as accessible as a CSS framework for a designer or developer. Cheers!

  • http://xobb.citylance.biz Xobb

    A nice framework you. I will use it for my personal projects, thanks.

  • http://www.vcarrer.com Vladimir

    @Jeffrey: Welcome to CSS Fans club.

    Yes it’s tue CSS Frameworks can be time savers and CSS Frameworks are not for noobs.
    I build 6 CSS layouts with Emastic(http://code.google.com/p/emastic/) in 1 hour.

  • http://iamdanielmarino.com Daniel Marino

    I’ve been using 960 for a little while now and I think its a great library. I’ll admit that it’s not perfect for every project, but it is easy-to-use and makes for quick prototyping.

    For the folks who don’t want to use it because it’s not 100% their own, I can understand the argument, but at the same time – if there was a tool to make life easier and it was appropriate for the project, why not use it? Its like building a table but not wanting to use a saw to cut the wood because you didn’t create the saw.

    I would like to say though that just because the 960 library exists, it is not an excuse for not knowing how to layout a website with css.

  • http://www.freshclickmedia.com Shane

    Interesting tutorial – I had always dismissed the ‘framework’ as being a little half-baked. I’m not going to rush and use it, but I’ll consider it in the future.

  • http://www.taddmencer.com Tadd

    I’ve used the 960 framework in the past and it works very well – especially when you need to quickly implement things and you don’t have time to sit down and handcode the framework yourself. While I do prefer to do it custom, I have no problem if I or anyone else uses a CSS framework. I think there is nothing wrong with that.

  • http://www.pcbymp.nl/mennopietersen ThaClown

    I’d like to see a BluePrint tutorial as well, would be great to compare these two web design tools….

  • http://www.jashsayani.com Jash Sayani

    Nice tutorial. You should also make one for CSS Beginners….
    Really looking forward to learning CSS !

  • owain Llewellyn

    I’m yet to try out these CSS frame works.. will deffinatley be having a go on my next project..

    Also wanted to mention that Screen casts are deffinatley the way to go.. Been watching most of Jeff’s vids and have learnt alot more this way..

    @jeff could you please take a look at a comment i made on the jflow tutorial (http://nettuts.com/videos/screencasts/using-the-wonderful-jflow-plugin-screencast/)

    Thank you…

    great work as always!

  • Wassim

    Besides the interesting screencast, you definitely make the big mix in your desktop Jeff: a Windows based PC + an OS X dock like + the Fedora core 9 wallpaper. Respect to you Jeff ;-)

  • http://themeforest.net/user/JeffreyWay Jeffrey Way
    Author

    @Wassim – Yeah – isn’t that fun. :)

    You’re the only one who picked up on the wallpaper.

  • http://simplyfull.com Steve Rose

    You’ve created a very clear and concise screen cast.

    I like this method, but what about how it affects the content sequence. I like the idea of having the main content first, followed by secondary content. I know this question is off-topic.

  • http://www.themolitor.com THE MOLITOR

    I’ve heard som much about this grid system. It’s nice to actually see what it does! Thanks Jeffrey.

  • Czuma

    Still can’t stand dealing with the class names and bloat, especially for making a simple 2 column site.

    For creating a complex mock-up quickly for a client, I’d probably give it a shot however.

    I still don’t put complete stock in NETTUTS editorials since – as a web development centric site – you still haven’t managed to implement a stable print style sheet.

  • http://parisvega.com Paris Vega

    Pretty convincing. I’ve used it to layout designs in Photoshop, but not for actual CSS layout, yet.

  • http://www.craniumdesigns.com Steve

    I prefer blueprint. That’s what I’ve been using. It’s less bloated. 960 is still good though.

  • http://themeforest.net/user/JeffreyWay Jeffrey Way
    Author

    Blueprint is less bloated than 960? How do you figure?

    I can get 960 down to 3k.

    • Khalil

      Dear Jeff,

      I am so confused after reading all of these comments and replies about Blueprint and 960.

      Kindly advise all of us which one framework should we choose or use.

      Thank you