put child at center of parent element
===

If you look at [Yahoo!](http://yahoo.com) home page, you find all content centered in page and if you resize browser window, left and right space will be removed and then scroll bar will appear. I want the same but whatever I do, I can not do that:

    <body>
    <div id="main" >
       <div class="logo"></div>
       <div class="content"></div>
       <div class="copyright"></div>
    </div>
    </body>

I want `main` to be at center of page( width is fixed but margin is not).