title: Why did the <div> with the class "container" cling to the left edge?
body: <p>Why is the div with the class “container” clinging to the left edge when the div with the class "boss" is normally displayed in the center?</p>
  
  <p>For a div with a "boss" class, I specified the width and the maximum width and everything works fine, but when I write the same code to the "container" class, the content is pressed to the left</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
  }
  
  *,
  *:before,
  *:after {
    box-sizing: border-box;
  }
  
  .header {
    background-color: coral;
  }
  
  .boss {
    width: 100%;
    max-width: 1100px;
    background-color: #313030;
    margin: 20px auto;
  }
  
  .container {
    width: 100%;
    max-width: 1100px;
  }
  
  .menu {
    display: flex;
    justify-content: center;
  }
  
  .button {
    padding: 40px 30px;
    transition: background-color .2s linear;
  }
  
  .button:hover {
    opacity: 2;
    background-color: red;
  }
  
  .link {
    color: white;
    text-decoration: none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
    &lt;header class="header"&gt;
      &lt;div class="boss"&gt;
        &lt;!-- works fine --&gt;
        &lt;div class="menu"&gt;
          &lt;div class="button"&gt;&lt;a class="link" href="#"&gt;HOME&lt;/a&gt;&lt;/div&gt;
          &lt;div class="button"&gt;&lt;a class="link" href="#"&gt;PORTFOLIO&lt;/a&gt;&lt;/div&gt;
          &lt;div class="button"&gt;&lt;a class="link" href="#"&gt;ABOUT US&lt;/a&gt;&lt;/div&gt;
          &lt;div class="button"&gt;&lt;a class="link" href="#"&gt;CONTACT&lt;/a&gt;&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="container"&gt;
        &lt;!-- have a problem --&gt;
        Example
        &lt;div class="text"&gt;
          Example
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/header&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>