title: Creating a Sidebar within a flexbox with CSS
body: <p>on my page I want to have a header and below this I want to have a sidebar on the left side and the content page on the right side.</p>
  
  <p>The sidebar should have a width of X (maybe 100 px) and the content page should have the rest of the full window with.</p>
  
  <p><a href="https://i.stack.imgur.com/qA52l.png" rel="noreferrer"><img src="https://i.stack.imgur.com/qA52l.png" alt="Page"></a></p>
  
  <p>I started creating this but my sidebar and content page don't have a full height. Even when setting height to 100% the don't fill the rest of the page.</p>
  
  <p>And why do I have to set a min and max width for the sidebar instead of width? When setting <code>width: 100px</code> the width returns 70px.</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>html {
    height: 100%;
  }
  
  body {
    height: 100%;
    margin: 0;
    font-family: Ubuntu;
    background: linear-gradient(#b3ffab, #67fffc);
  }
  
  #header {
    height: 30px;
    display: flex;
    align-items: center;
    background: linear-gradient(#444444, #333333);
    color: #bbbbbb;
  }
  
  #headerContent {
    margin-left: 10px;
  }
  
  #page {
    display: flex;
  }
  
  #sideBar {
    min-width: 100px;
    max-width: 100px;
    background: red;
  }
  
  #content {
    width: 100%;
    background: blue;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Ubuntu" /&gt;
  
  &lt;div id="header"&gt;
    &lt;div id="headerContent"&gt;
      Desktop
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div id="page"&gt;
    &lt;div id="sideBar"&gt;
      &lt;div&gt;
        box 1
      &lt;/div&gt;
      &lt;div&gt;
        box 2
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div id="content"&gt;
      content
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>