title: How to set the max-width of a container with flexbox?
body: <p>I would like to have <code>services-bar__title</code> and <code>services-bar__services</code> to have a <code>max-width</code> of <code>1024px</code> so that I get the normal flexbox behaviour for the container as formatted below, but the list doesn't expand further than <code>1024px</code> if the viewport is wider. I tried setting the container widths and max-widths, but it doesn't seem to work as expected as the container doesn't stay centered anymore, any ideas?</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>.services-bar {
    display: flex;
    flex-direction: column;
    height: 20rem;
    width: 100%;
    box-shadow: 0 -3rem 8rem rgba(#000, 0.5);
  }
  
  .services-bar__title {
    display: flex;
    flex-direction: row;
    justify-content: center;
  }
  
  .services-bar__services {
    display: flex;
    flex-direction: row;
    justify-content: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="services-bar"&gt;
    &lt;div class="services-bar__title"&gt;
      test title
    &lt;/div&gt;
    &lt;div class="services-bar__services"&gt;
      &lt;div class="services-bar__services_1"&gt;&lt;/div&gt;
      &lt;ul&gt;
        &lt;li&gt;test&lt;/li&gt;
        &lt;li&gt;test&lt;/li&gt;
        &lt;li&gt;test&lt;/li&gt;
        &lt;li&gt;test&lt;/li&gt;
      &lt;/ul&gt;
      &lt;div class="services-bar__services_2"&gt;&lt;/div&gt;
      &lt;ul&gt;
        &lt;li&gt;test&lt;/li&gt;
        &lt;li&gt;test&lt;/li&gt;
        &lt;li&gt;test&lt;/li&gt;
        &lt;li&gt;test&lt;/li&gt;
      &lt;/ul&gt;
      &lt;div class="services-bar__services_3"&gt;&lt;/div&gt;
      &lt;ul&gt;
        &lt;li&gt;test&lt;/li&gt;
        &lt;li&gt;test&lt;/li&gt;
        &lt;li&gt;test&lt;/li&gt;
        &lt;li&gt;test&lt;/li&gt;
      &lt;/ul&gt;
      &lt;div class="services-bar__services_4"&gt;&lt;/div&gt;
      &lt;ul&gt;
        &lt;li&gt;test&lt;/li&gt;
        &lt;li&gt;test&lt;/li&gt;
        &lt;li&gt;test&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>