title: css div with auto margins does not scale smaller
body: <p>i have a div which needs to be horizontal-centered and can scale smaller than its width.</p>
  
  <p>I use this code to center the div, but it doesn't work with scaling. the div wont scale smaller then its max-width. This is true for both Firefox and IE.</p>
  
  <pre><code>/* CSS doesnt work in Firefox and IE */
  .center
  {
      max-width: 940px;
      height: inherit;
  
      background-image: url(../img/koeien%20liggen.JPG);
      background-size: 100% auto;
      background-repeat: no-repeat;
  
      margin-left: auto;
      margin-right: auto;
  }
  
  /* HTML */
  &lt;div class="headerWrapper"&gt;
      &lt;div class="center"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How do i center a div horizontally and let it scale smaller when resizing the browser in IE, Firefox and Chrome?</p>