[CSS Zen Garden]The Negative-Margin Solution for Center layout
background: #ffc;
position: absolute;
left: 50%;
width: 900px;
margin-left: -450px;
}
margin-left is half of #container width, and position of #container must be absolute.
The preferred way to horizontally center any element is to use the margin property and set left and right values to auto. For this to work with layouts, you'll create a containing div. You must include a width for your containing div: