max-width

#main {
  max-width: 600px;
  margin: 0 auto; 
}
<div id="main">

Using max-width instead of width in this situation will improve the browser's handling of small windows. This is important when making a site usable on mobile. Resize this page to check it out!

By the way, max-width is supported by all major browsers including IE7+ so you shouldn't be afraid of using it.

</div>
  • Creative Commons License