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.sigmabeta.co.uk SimBis

    Nice one, very helpful and clear screencast.
    Cheers

  • http://www.dpalm.com.br/blog Daniel Palmério

    What’s name of firefox plugin used in this video to real time edition?

    hugs

  • http://users.hol.gr/~papadimitrakiskonstantinos/ konstantinos papadimitrakis

    it’s to complex process to create something horable, hey beginner user the point is one, which technology are you going to trust to work with? and according to the point of fact adobe is the wrong solution, for example the body who just try to demonstrate his technics with silly and complex codes to build this awful site is totally wrong, why I have to waste my time to learn codes to use the useless and expensive software of adobe while I can draw anything I want and then to embedded to http file with one click? this guy want to learn to program in midi while we use FL Studio or an another example he try to learn us to write a letter with assembly while we ‘ve got MS Word, this guy is try to confuse us and to make us feel dummies, this guy is totally out of his mind, he need 25 minutes to do what I can do in less than 50 seconds

  • http://www.needcaffeine.com michael

    this is awesome, thanks

  • Micz

    960 is great and screencast is also graet. thx.

  • http://www.jeremygode.com Jeremy Gode

    Very nice tutorial.. might play around with this for an upcoming project.

  • Pingback: 30 HTML Best Practices for Beginners | e-szablony.eu - Tutoriale, Kursy

  • http://pacificlawcenter.com Jay

    thanks . this really helped me understand 960. My question is why not mske s 1060 , 1160 rtc?

    • juss

      There is a css grid generator for this :) so you can create a grid of 770 if you want

  • http://dahito.com Louis-Pierre Dahito

    Thank you so much for this tutorial… Now I can realize how much time I’ll be saving using this amazing framework… Great tutorial once again ! Good Job

  • http://www.mtbo.us Kyle Bondo

    Fantastic webcast!! Thank you! ;)

  • http://web-site.te.ua Solexy

    thx

  • http://www.sciencesquare.com Kamal Prasad

    Great intro. Thanks! I will definitely look into CSS frameworks for my next project that I have to do from scratch. Dugg!

  • Pingback: The 960 Grid System Toolbox & Resources | Webdesigner Depot

  • http://www.walterfantauzzi.com Walter Fantauzzi

    Very Nice tutorial,

    Now I’ve get more knowledge about 960 Grid System an so WOW!

  • http://firedart.co.cc/ FireDart

    Love it!

    May just have to this 960 Grid.

    -FireDart

  • Pingback: 960 Grid System: The Css Framework | Refreshi Weblog | News and Inspiration

  • http://www.hiprofile.com HiProfile

    Very interesting tutorial.

    Bhy the way Jeff what software are you using to do the screen cast I like the way you are zooming in and out on the screen
    Could you tell me what you are using

    Thanks in advance

  • Monit

    Awesome! I am going to try out 960 in my next project.

  • Adele

    Nice — thanks for doing this tutorial!

  • Zolika

    I have seen it once, loved it .. it’s not working any more… is the video still available?

  • Zolika

    now it is workin again… thanks for the great tutorial!

  • Pingback: The 960 Grid System Toolbox & Resources | Business Marketing Experts

  • Pingback: 20 Tools to Make the Life of a Web Developer Easier | Ouech.net

  • Pingback: 20 Tools to Make a Web Developer’s Life Much Easier « TechWorthy

  • Pingback: 20 Tools to Make the Life of a Web Developer Easier « Mahesh VNIT’s Weblog

  • http://www.mariomelchor.com Mario

    I’ve been looking for an explanation of the 960 Framework. Just what i needed thanks.

  • Pingback: Good Links, June 12,2009 « Emad’s Weblog

  • http://www.lucky-bonus.com/ Dalam Hensi

    Great work!Thanks!

  • Pingback: 20 Tools to Make the Life of a Web Developer Easier | rapid-DEV.net

  • http://wishu-blog.net Wishu

    Thanx for the nice Video-Turorial

  • Pingback: Dave勇气吧 » Blog Archive » 20个使Web开发变得更轻松的制作工具

  • John Evans

    I have to say this much as someone whom literally converted to CSS based design about a year ago (was coming off of 11 years of tables based design) that I think this is a wonderful tool. I believe development is shifting for designers as your client is paying you as a highly paid professional and not so much a code monkey. Take that for what its worth. Tools like 960, Jquery and WordPress even are literally your Swiss Army Knife and your job is to beautifully mesh them. After the beautiful mesh you are should be fully training your client on the proper usage of the end product. I’m sold on this framework after watching the video so many thanks to Jeff and sorry for the long reply.

  • http://www.twitter.com/marcellpurham Marcell

    Didn’t really understand the whole 960 thing but after this tutorial I now understand it.

    I love how you created a layout less than 5minutes

    Great Screencast!

  • David

    I thank you for the quick lesson and as always great stuff.

  • Pingback: Getting Started with the 960 Grid System | DrupalEasy

  • http://www.flyinghstudios.com Andy McCraw

    Thanks Jeff, great breakdown of the merits and uses of the 960 framework. I also appreciated (stole) some of your other methods that you briefly revealed: the template index/css/js setups. What’s great about this is that you’re actually helping us drastically improve workflow – which translates directly to more $ in our pockets! As developers and designers essentially our only product is our time. More productivity means more projects done in a shorter amount of time. And that means more cold, hard cash!

  • Adson Cristian

    Congrats Jeff. No one could ever have explained it clearer than you did.
    If you’re to have tuts, articles, et cetera to be translated into Brazilian Portuguese, count on me.

  • Pingback: Tuts Site » Blog Archive » 20 Tools to Make the Life of a Web Developer Easier

  • Pingback: /home/andiagusti/ » 30 HTML Best Practices for Beginners

  • http://www.bigtunainteractive.com Adam Hermsdorfer

    Hey Jeff,

    I was just researching the grid structure and your tutorial hit the ball. You are right that if you know what you’re doing, it should only take 5 minutes to digest but it can be confusing if you’re a newbie. I’ll definitely be using it in the future.

  • http://www.rosmedia.biz Bart Ros

    Really great one!

    This will improve work from tremendously! Thanks!

  • Jason

    Really enjoyed this sc. Not sure if I’m going to use 960 quite yet, still a beginner at css as I’m just now getting into designing. I’ve been using free templates to practice.

  • Andy

    Thanks a lot Jeff, very well explained. I going to give 960 a try and think it will save a whole load of time.

    Cheers :)

  • Colin McCormick

    Brilliant screen cast. It’s certainly convinced me to look into a css framework. Not sure whether it will be 960 or blueprint though. I think the advice you give about learning css first is very important. I remember when I first started css, as if the box model wasn’t hard enough, you have to understand that not all browsers apply it the same way.

    I have one small niggly point about your screen cast. As a side point you mention the use of a template folder, that’s great and I use one myself, but when you talk about conditional comments for IE6 and using the fix for png transparency, the coditional comment shown on the screen is actually for IE7.

  • http://www.facebook.com/cristian.marquez.russo Cristian

    Hi! great video!
    Im now learning about this framework! I will let you know about my new site using your tips :-D
    Bye!

  • http://www.boudigi.com Swannie

    Thanks for the great screencast. I totally love how 960 makes it easier, thanks to Nathan to have created this awesome framework.

    Cheers!

  • Pingback: A framework for CSS? Yes, and it is awesome. – The Daily Code

  • Pingback: solwyvern » The 960 CSS Framework

  • http://pixelhorizon.co.uk Alex Blundell

    Thanks for such a great screencast. I can’t believe I’ts taken me this long to jump on this…

    I have nioticed that a lot of the sites showcased on the 960.gs site have no reference to class=”grid_##”>, I guess this has just been manually edited out once the layout has been finalised?

  • http://www.janfehlis.de janji

    Thanks for inspiring sc!
    have to look up for your png fix too : )