title: Flexbox sidebar with max-width
body: <p>Is it possible to set max-width on the sidebar in my flexbox layout without affecting the content area (article)? Changing the max-width now also affects the content area. I want the current functionality, with the layout being responsive, but also setting a max-width on the sidebar. </p>
  
  <p><a href="https://codepen.io/bvcx/pen/PzXZxz" rel="nofollow">Codepen</a></p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;div class="flex-container"&gt;
  
          &lt;nav class="nav"&gt;
              &lt;ul&gt;
                  &lt;li&gt;&lt;a href="#"&gt;Menu1&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;Menu2&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;Menu3&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/nav&gt;
  
          &lt;article class="article"&gt;
              &lt;h1&gt;Lorem ipsum&lt;/h1&gt;
              &lt;p&gt;Lorem ipsum dolor ....&lt;/p&gt;
          &lt;/article&gt;
  
      &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>CSS:</strong></p>
  
  <pre><code>.flex-container {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-flow: row wrap;
    flex-flow: row wrap;
    text-align: center;
  }
  
  .flex-container &gt; * {
    padding: 15px;
    -webkit-flex: 1 100%;
    flex: 1 100%;
  }
  
  .article {
    text-align: left;
  }
  
  .nav {
    background:#eee;
  }
  
  .nav ul {
    list-style-type: none;
    padding: 0;
  }
  
  .nav ul a {
    text-decoration: none;
  }
  
  @media all and (min-width: 768px) {
    .nav {
      text-align:left;
      -webkit-flex: 1 auto;
      flex:1 auto;
      -webkit-order:1;
      order:1;
    }
  
    .article {
      -webkit-flex:5 0px;
      flex:5 0px;
      -webkit-order:2;
      order:2;
    }
  }
  </code></pre>