title: Center a div with a max-width without margin: auto;
body: <p>Thats my pen: <a href="http://codepen.io/helloworld/pen/oxgqpJ" rel="nofollow">http://codepen.io/helloworld/pen/oxgqpJ</a></p>
  
  <p>I want to center a div with a fixed max width, but when I am under the fixed max width I want a margin of 10% on each side , because at the moment there is no visible margin in that resolution area.</p>
  
  <p>The drawback is using that 10% margin on each side the div is not centered anymore it starts on the left side...</p>
  
  <p>How can I fix that?</p>
  
  <pre><code>&lt;div id="container"&gt;
    Center me with a fixed max width, but when I am under the fixed max width I want a margin of 10% on each side , because at the moment there is no visible margin.
  &lt;/div&gt;
  
  
  
  #container
  {
    margin: 0 auto;
  
    // use instead in smaller resolutions
    //margin: 0 10%;
    max-width:1024px;
    background:orange;
  }
  </code></pre>