[thelist] Centered Container DIV

David Eleuterius lists at ardentnewmedia.com
Tue May 24 09:30:50 CDT 2005


Minh Lee Goon wrote:

> Here's my stylesheet:
> 
> #body {
>     text-align: center;
> }
> #container {
>     width: 660px;
> }

Minh,

Try this:

#container {
	width: 660px;
	margin-left:auto;
	margin-right:auto;
}

Setting the margins to auto on both sides should get it the way you want it.


More information about the thelist mailing list