Congratulations!

You have generated a 1024px 960.gs grid system | 4 columns ~ margin left: 21px ~ margin right: 21px

The grid result is shown below (or a full screen preview)

Follow these instructions to get started:

  1. Download the css/xhtml & template files
  2. Include the file "1024_4_21_21.css" in the <head> of the HTML page.
  3. You may also use the included reset.css and text.css files, or opt to leave them out.

[ Click here for more detailed installation instructions ]

960.gs quick statistics

Total grid systems generated: 2824057

Unique grid systems generated: 34566

960.gs generator version

Version 1.04 - change history

Generated grid systems are based on the 960.gs by Nathan Smith.

960.gs tutorials

960.gs generator

 

Source code 1024px, 4 columns ~ margin left: 21px ~ margin right: 21px

CSS link code

<link rel="stylesheet" type="text/css" href="http://gridsystemgenerator.com/download/gs01/uncompressed/css/1024_4_21_21.css">

CSS code

/*
1024px grid system ~ Core CSS.
4 Columns ~ Margin left: 21px ~ Margin right: 21px

Based on the 960.gs grid system - http://960.gs/
by Nathan Smith

Created by the Grid System Generator - v1.04
Learn more ~ http://www.gridsystemgenerator.com/
*/

/*
Forces backgrounds to span full width,
even if there is horizontal scrolling.
Increase this if your layout is wider.

Note: IE6 works fine without this fix.
*/
body {
	min-width: 960px;
}

/* =Containers
--------------------------------------------------------------------------------*/
.container_4
{
	margin-left: auto;
	margin-right: auto;
	width: 1024px;
}

/* =Grid >> Global
--------------------------------------------------------------------------------*/
.grid_1,
.grid_2,
.grid_3,
.grid_4 {
	display: inline;
	float: left;
	margin-left: 21px;
	margin-right: 21px;
}

.push_1, .pull_1,
.push_2, .pull_2,
.push_3, .pull_3 {
	position: relative;
}

/* =Grid >> Children (Alpha ~ First, Omega ~ Last)
--------------------------------------------------------------------------------*/
.alpha {margin-left: 0;}
.omega {margin-right: 0;}

/* =Grid >> 4 Columns
--------------------------------------------------------------------------------*/
.container_4 .grid_1 {width: 214px;}
.container_4 .grid_2 {width: 470px;}
.container_4 .grid_3 {width: 726px;}
.container_4 .grid_4 {width: 982px;}

/* =Prefix Extra Space >> 4 Columns
--------------------------------------------------------------------------------*/
.container_4 .prefix_1 {padding-left: 256px;}
.container_4 .prefix_2 {padding-left: 512px;}
.container_4 .prefix_3 {padding-left: 768px;}

/* =Suffix Extra Space >> 4 Columns
--------------------------------------------------------------------------------*/
.container_4 .suffix_1 {padding-right: 256px;}
.container_4 .suffix_2 {padding-right: 512px;}
.container_4 .suffix_3 {padding-right: 768px;}

/* `Push Space >> 4 Columns
--------------------------------------------------------------------------------*/
.container_4 .push_1 {left: 256px;}
.container_4 .push_2 {left: 512px;}
.container_4 .push_3 {left: 768px;}

/* `Pull Space >> 4 Columns
--------------------------------------------------------------------------------*/
.container_4 .pull_1 {left: -256px;}
.container_4 .pull_2 {left: -512px;}
.container_4 .pull_3 {left: -768px;}

/* `Clear Floated Elements
----------------------------------------------------------------------------------------------------*/
/* http://sonspring.com/journal/clearing-floats */
.clear {
	clear: both;
	display: block;
	overflow: hidden;
	visibility: hidden;
	width: 0;
	height: 0;
}

/* http://www.yuiblog.com/blog/2010/09/27/clearfix-reloaded-overflowhidden-demystified */
.clearfix:before,
.clearfix:after {
	content: "\0020";
	display: block;
	overflow: hidden;
	visibility: hidden;
	width: 0;
	height: 0;
}
.clearfix:after {
	clear: both;
}
/*
The following zoom:1 rule is specifically for IE6 + IE7.
Move to separate stylesheet if invalid CSS is a problem.
*/
.clearfix {
	zoom: 1;
}

HTML code

<div class="container_4">
  <h1><a href="http://www.gridsystemgenerator.com/gs01.php?GridWidth=1024&amp;GridColumns=4&amp;GridMarginLeft=21&amp;GridMarginRight=21">1024px valid css/xhtml 960.gs grid system</a></h1>
  <h2>4 columns ~ margin left: 21px ~ margin right: 21px</h2>
    <div class="grid_4"><p>982px</p></div>
    <!-- end .grid_4 -->
    <div class="clear">&nbsp;</div>
  <div class="grid_1">
    <p>214px</p>
  </div>
  <!-- end .grid_1 -->
  <div class="grid_3">
    <p>726px</p>
  </div>
  <!-- end .grid_3 -->
  <div class="clear">&nbsp;</div>
  <div class="grid_2">
    <p>470px</p>
  </div>
  <!-- end .grid_2 -->
  <div class="grid_2">
    <p>470px</p>
  </div>
  <!-- end .grid_2 -->
  <div class="clear">&nbsp;</div>
  <div class="grid_3">
    <p>726px</p>
  </div>
  <!-- end .grid_3 -->
  <div class="grid_1">
    <p>214px</p>
  </div>
  <!-- end .grid_1 -->
  <div class="clear">&nbsp;</div>
  <div class="grid_1 suffix_3">
    <p>214px</p>
  </div>
  <!-- end .grid_1.suffix_3 -->
  <div class="clear">&nbsp;</div>
  <div class="grid_1 prefix_1 suffix_2">
    <p>214px</p>
  </div>
  <!-- end .grid_1 -->
  <div class="clear">&nbsp;</div>
  <div class="grid_1 prefix_2 suffix_1">
    <p>214px</p>
  </div>
  <!-- end .grid_2 -->
  <div class="clear">&nbsp;</div>
  <div class="grid_1 prefix_3 suffix_0">
    <p>214px</p>
  </div>
  <!-- end .grid_3 -->
  <div class="clear">&nbsp;</div>
  <div class="grid_1 push_3">
    <p>Push (214px)</p>
  </div>
  <!-- end .grid_1 .push_3 -->
  <div class="grid_3 pull_1">
    <p>Pull (726px)</p>
  </div>
  <!-- end .grid_3.pull_1 -->
  <div class="clear">&nbsp;</div>
  <div class="grid_2 push_2">
    <p>Push (470px)</p>
  </div>
  <!-- end .grid_2 .push_2 -->
  <div class="grid_2 pull_2">
    <p>Pull (470px)</p>
  </div>
  <!-- end .grid_2.pull_2 -->
  <div class="clear">&nbsp;</div>
  <div class="grid_3 push_1">
    <p>Push (726px)</p>
  </div>
  <!-- end .grid_3 .push_1 -->
  <div class="grid_1 pull_3">
    <p>Pull (214px)</p>
  </div>
  <!-- end .grid_1.pull_3 -->
  <div class="clear">&nbsp;</div>
    <div class="grid_4">
      <p>This valid css/xhtml grid system is created by the <a href="http://www.gridsystemgenerator.com">Grid System Generator</a><br />
      Based on the 960.gs grid system.<br />
      <a href="http://validator.w3.org/check/referer">XHTML</a> - <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></p>
    </div>
    <!-- end .grid_4 -->
    <div class="clear">&nbsp;</div>
</div>
<!-- end .container_4 -->

Reset.css

/* http://meyerweb.com/eric/tools/css/reset/ */
/* v1.0 | 20080212 */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	font-size: 100%;
	vertical-align: baseline;
	background: transparent;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}

/* remember to define focus styles! */
:focus {
	outline: 0;
}

/* remember to highlight inserts somehow! */
ins {
	text-decoration: none;
}
del {
	text-decoration: line-through;
}

/* tables still need 'cellspacing="0"' in the markup */
table {
	border-collapse: collapse;
	border-spacing: 0;
}

Text.css

/* `Basic HTML
----------------------------------------------------------------------------------------------------*/

body {
	font: 13px/1.5 'Helvetica Neue', Arial, 'Liberation Sans', FreeSans, sans-serif;
}

a:focus {
	outline: 1px dotted;
}

hr {
	border: 0 #ccc solid;
	border-top-width: 1px;
	clear: both;
	height: 0;
}

/* `Headings
----------------------------------------------------------------------------------------------------*/

h1 {
	font-size: 25px;
}

h2 {
	font-size: 23px;
}

h3 {
	font-size: 21px;
}

h4 {
	font-size: 19px;
}

h5 {
	font-size: 17px;
}

h6 {
	font-size: 15px;
}

/* `Spacing
----------------------------------------------------------------------------------------------------*/

ol {
	list-style: decimal;
}

ul {
	list-style: disc;
}

li {
	margin-left: 30px;
}

p,
dl,
hr,
h1,
h2,
h3,
h4,
h5,
h6,
ol,
ul,
pre,
table,
address,
fieldset {
	margin-bottom: 20px;
}