This is quite easy to do. First, create your HTML:

<body>
   <div id="container">
      ...
   </div>
</body>

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;
}