Tables and pure CSS are not the only choices for layout management.
Grid based css libraries have the benefits of rapid design, an easy learning curve, good consistency and minimal markup. They also come with a reset.css (clears default styles), free you from working in pixels and promote thinking about structure, proportions, white space, and scalability.
As an introduction, we’ll look at how to create a 3 column layout in blueprint. Lets get started.
Download blueprint.css from http://www.blueprintcss.org/ (zip next to the logo). extract it and put the blueprint folder into your css folder.
- Create an index.html file and link it up to blueprint.css:
<head>
<link rel="stylesheet" href="css/blueprint/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="css/blueprint/print.css" type="text/css" media="print">
<!--[if IE]><link rel="stylesheet" href="css/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
<style>
.g {background-color:green;}
.b {background-color:blue;}
//g and b to visualize what we're doing and can be removed at any time.
</style>
</head>
- Add a container to the body:
<body>
<div class="container showgrid"> <!--the class showgrid is for debugging and can be removed at any time -->
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> <!-- all further code goes in this container!!! -->
</div>
</body>

just a normal blueprint grid.
This is our grid. You can see 24 columns, some space in between each column, and some rows corresponding to the breaks that we’ve put in.
- Lets create a header. In the container after the breaks add this div:
<div class="span-24 last g">This is a header.</div>
span-24 means this div spans 24 columns. last means its the last one in that row, and is used to let blueprint know when to go to the next row.

a simple header to our simple website
- Lets create a 3 column layout. Since we have 24 columns, lets try 6/12/6 proportions.
<div class="span-6 g">column1</div>
<div class="span-12 b">column2</div>
<div class="span-6 last g">column3</div>

3 column layout, without many hacks, tables, or difficulties.
<div class="span-24 last b">footer</div>

And the layout is finished.
There. The layout is done, but we still have to use css to stylize things, add in content, etc. I’ll show that in a bit, but that’s really all you need to know in order to dive into blueprint.
Before you go off playing around with it, you should look into blueprint/src, and read each of the css files, especially grid.css – they’re tremendously helpful in telling you what blueprint can do for you. Make sure you try out the push, pull, append, prepend, box, border, colborder, and hr classes, as they’re used often. Feel free to add in your own classes – I like to keep my colors as classes so that I don’t get tempted to go color picking for an hour or two.
Do note that blueprint may break if you try to stylize in the same div that you do layouts with. So, don’t do:
<div class="span-10" style="border 1px solid black;"> some content</div>
and instead do:
<div class="span-10"><div style="border 1px solid black;">some content</div></div>
an extra layer, but overall still nothing as bad as tables.
I’ll leave you with a somewhat stylized form of what we had previously. Blueprint has great samples and test pages that show you exactly what it can do for you, so you should check that out. Their sample page shows just how trivially easy it is to nest columns within columns, creating as complex a layout as you want.
Final look: I added in a simple list on the left, a table on the right, a box class for the header, some hr’s, and some lorem ipsum.

Final look of the site! Simple stuff, really...
<head>
<link rel="stylesheet" href="css/blueprint/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="css/blueprint/print.css" type="text/css" media="print">
<!--[if IE]><link rel="stylesheet" href="css/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
<style>
.g {background-color:green;}
.b {background-color:blue;}
#g and b to visualize what we're doing.
</style>
</head>
<body>
<div class="container">
<div class="span-24"><h2 class="box">This is a header.</h2></div>
<hr>
<div class="span-6"><ul style="text-align:right;">
<li><a href="#">This</a></li>
<li><a href="#">is</a></li>
<li><a href="#">my</a></li>
<li><a href="#">friendly</a></li>
<li><a href="#">navigation</a></li>
<li><a href="#">bar.</a></li>
</ul></div>
<div class="span-12"><div style="padding:20px;border:1px solid #d6d6d6;"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse est justo, tincidunt eu, ornare ornare, vehicula id, augue. Proin eu elit. Curabitur dignissim blandit augue. Nam dui nisi, convallis ac, hendrerit at, commodo et, dui. Maecenas consequat, felis eleifend gravida pellentesque, neque purus venenatis tellus, a rhoncus tortor lectus non nisi. Proin sodales, ante faucibus tempor tincidunt, risus leo iaculis velit, sed aliquet sem lacus eget purus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec vestibulum turpis ac neque. Maecenas suscipit orci non nibh. Donec tristique. Donec nec diam ut odio fermentum auctor. Nullam molestie sapien.
</p><p>
Nullam vel quam nec nisi luctus bibendum. Praesent lobortis dui eu augue. Phasellus consectetur, erat a condimentum hendrerit, sem massa elementum neque, sit amet elementum justo ligula vitae nunc. Cras rhoncus libero id purus. Aenean nulla enim, placerat nec, tincidunt id, gravida sit amet, erat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nullam eleifend dolor. Integer massa magna, dignissim ut, semper sit amet, laoreet id, magna. Cras convallis ligula sit amet sapien. Mauris blandit elit sit amet leo.</p> </div></div>
<div class="span-6 last">
<table>
<tr><td><a href="#">This</a></td></tr>
<tr><td><a href="#">is</a></td></tr>
<tr><td><a href="#">Navigation</a></td></tr>
<tr><td><a href="#">Done</a></td></tr>
<tr><td><a href="#">in</a></td></tr>
<tr><td><a href="#">Tables</a></td></tr>
</table>
<div class="box">This is an advertisement!!!<br/><br/><br/><br/><br/><br/><br/><br/><br/></div>
</div>
<hr>
<div class="span-24 last"><div style="text-align:right" class="large">and finally a footer. (c) 2009 by... wait this took less than 15 minutes.</div></div>
</div>