30
960 Grid System A hands-on introduction By Mario Hernandez - District Court - California Central Collaborative Applications Development Forum - August 2011 Sunday, August 28, 11

960 Grid System - A hands-on introduction

Embed Size (px)

DESCRIPTION

This hands-on introduction to the 960 grid system was prepared by Mario Hernandez in an effort to educate fellow designers and developers of the Federal Court system in the use of grids and frameworks. August 2011

Citation preview

Page 1: 960 Grid System -  A hands-on introduction

960 Grid SystemA hands-on introduction

By Mario Hernandez - District Court - California Central

Collaborative Applications Development Forum - August 2011

Sunday, August 28, 11

Page 2: 960 Grid System -  A hands-on introduction

What is a grid system?A series of columns working as guides to streamline web development workflow by providing commonly used dimensions, based on a fixed width of 960 pixels.

Source: Wikipedia

Sunday, August 28, 11

Page 3: 960 Grid System -  A hands-on introduction

Not exclusive to web design

Sunday, August 28, 11

Page 4: 960 Grid System -  A hands-on introduction

Grid Systems on Graphic Design

Sunday, August 28, 11

Page 5: 960 Grid System -  A hands-on introduction

Source: Grid (page layout), wikipedia

Sunday, August 28, 11

Page 6: 960 Grid System -  A hands-on introduction

Painting by Piet Mondriaan (later Mondrian)Sunday, August 28, 11

Page 7: 960 Grid System -  A hands-on introduction

Grid systems on the web

• Grid systems on the web usually take the form of a CSS framework

• A framework is a “reuseable abstraction of code wrapped in a well-defined API” *

• A collection of tools and shortcuts designed to minimize code and make your life easier

* Source: Software framework, Wikipedia

Sunday, August 28, 11

Page 8: 960 Grid System -  A hands-on introduction

Examples of Frameworks

Sunday, August 28, 11

Page 9: 960 Grid System -  A hands-on introduction

CSS Frameworks

• Apply the principles of software frameworks to web design

• They provide standardized rules and shortcuts for:

• Browser resets (http://meyerweb.com/eric/tools/css/reset/)

• Typography

• Navigation

• Print styleSunday, August 28, 11

Page 10: 960 Grid System -  A hands-on introduction

Why use a grid system?

• Saves time

• Saves money

• Reduces frustration

Sunday, August 28, 11

Page 11: 960 Grid System -  A hands-on introduction

Adopting a grid system can accelerate design while maintaining orderPhoto by dysturb, Grid. Flickr

Sunday, August 28, 11

Page 12: 960 Grid System -  A hands-on introduction

How do grid systems work?

Example based on 960.gs (12 columns)

• Grid systems are built using columns

• Columns are grid system’s smallest unit of measurement

• The two most popular version of a grid system are 12 and 16 columns

Sunday, August 28, 11

Page 13: 960 Grid System -  A hands-on introduction

Column width

• Page regions (header, sidebar, content, etc.,) are defined by column width

• As in: “The header is eight columns wide”

Example based on 960.gs (12 columns)

Sunday, August 28, 11

Page 14: 960 Grid System -  A hands-on introduction

Gutters (margins)

• Margins are used to create gutters between columns

• These margins provide gutters between page regions

Example based on 960.gs (12 columns)

Sunday, August 28, 11

Page 15: 960 Grid System -  A hands-on introduction

Floating <div> elements• The wrapping <div>

elements are assigned a column width using a CSS class

• Because these classes also float the elements, they simply fall into place on the page class: grid_6 class: grid_6

class: grid_4

class: grid_4class: grid_4

class: grid_12

class: grid_8

Sunday, August 28, 11

Page 16: 960 Grid System -  A hands-on introduction

Example of floating elements

.box1

.box2

.box3

Sunday, August 28, 11

Page 17: 960 Grid System -  A hands-on introduction

Example of floating elements

.box1 .box2

.box3

Sunday, August 28, 11

Page 18: 960 Grid System -  A hands-on introduction

Example of floating elements

.box1 .box2 .box3

Sunday, August 28, 11

Page 19: 960 Grid System -  A hands-on introduction

Example of floating elements

.box1, .box2, .box3 {display:block; float:left; margin: 0 10px;}

.box1 .box2 .box3

Sunday, August 28, 11

Page 20: 960 Grid System -  A hands-on introduction

What is 960.gs?

• 960.gs — also known as the 960 Grid System — was created by Nathan Smith in order to “streamline web development workflow”

• It’s both a prototyping and development framework

Source: 960.gs

Sunday, August 28, 11

Page 21: 960 Grid System -  A hands-on introduction

What’s in it?

Source: 960.gs

• You can download it from http://960.gs

• GPL and MIT licensed

• The 960.gs download includes:

• Printable sketch sheets for doodling

• Design templates for all most applications: Photoshop, Illustrator, Inkscape, OmniGraffle, etc.

Sunday, August 28, 11

Page 22: 960 Grid System -  A hands-on introduction

12 column version

Source: 960.gs

Sunday, August 28, 11

Page 23: 960 Grid System -  A hands-on introduction

• grid_x (where X indicates the number of columns an element is given)

• alpha & omega: Fix floats on nested regions

• prefix & suffix: Allow empty spaces before or after a region

• pull & push: Rearrange regions independently of the order they appear on the markup

Grid system CSS classes

Source: 960.gs

grid_4push_6

grid_4pull_6

Sunday, August 28, 11

Page 24: 960 Grid System -  A hands-on introduction

• grid_x (where X indicates the number of columns an element is given)

• alpha & omega: Fix floats on nested regions

• prefix & suffix: Allow empty spaces before or after a region

• pull & push: Rearrange regions independently of the order they appear on the markup

Grid system CSS classes

Source: 960.gs

grid_4push_6grid_4pull_6

Sunday, August 28, 11

Page 25: 960 Grid System -  A hands-on introduction

• grid_x (where X indicates the number of columns an element is given)

• alpha & omega: Fix floats on nested regions

• prefix & suffix: Allow empty spaces before or after a region

• pull & push: Rearrange regions independently of the order they appear on the markup

Grid system CSS classes

Source: 960.gs

grid_4push_6

grid_4pull_6

Sunday, August 28, 11

Page 26: 960 Grid System -  A hands-on introduction

Let’s see it in actionThe rest of the presentation is a hands-on demo of the grid system.

Sunday, August 28, 11

Page 27: 960 Grid System -  A hands-on introduction

Sunday, August 28, 11

Page 28: 960 Grid System -  A hands-on introduction

When not to use a grid system

• Implementing a grid will probably be impossible if your site’s layout...

• uses irregular column sizes

• has irregular margins or gutters

• has a width that isn’t divisible by a sane number

Sunday, August 28, 11

Page 29: 960 Grid System -  A hands-on introduction

Questions?phone: 818-275-4927

email: [email protected]

twitter: @designsdrive

Sunday, August 28, 11

Page 30: 960 Grid System -  A hands-on introduction

Acknowledgements• Nathan Smith: Creator of the 960 grid system. Without his influence

and vision this presentation would not be possible. Learn more about the grid system at http://960.gs

• Todd Nienkerk: Co-founder, designer four kitchens (twitter: @toddross). I saw his 960 grid system presentation at the 2011 LA DrupalCamp conference and he blew me away. He kindly allowed me to use some of his material for this presentation. You can catch his presentations at http://fourkitchens.com/presentations.

• Jonathan D’andries: Developer for District Court, WIWD. His hard work on promoting standards and best practices for design and development within the Court’s system is influential. I personally thank him for the opportunities he has given me.

This presentation was created by Mario Hernandez in an effort to educate fellow designers and developers of the Federal Courts System in the use grids and frameworks. August 2011.

Sunday, August 28, 11