Forum Moderators: open
In this example, the div with the id of "container" is what we want to make centered and fixed width. Now for the CSS:
body
{
margin: 0;
padding: 0;
text-align: center;
}
#container
{
margin: 0 auto;
width: 770px;
border: 1px solid red;
}
The border is simply to show you where the edges of container are located.
[edited by: Fotiman at 9:15 pm (utc) on July 12, 2006]