title: How to make the height of a div shrink as much as possible?
body: <p>I've got a header menu which I'm trying to make responsive using CSS flex.</p>
  
  <p>The flex functionality works fine, but the height of the items are always huge for some reason.</p>
  
  <p>The code I'm using is below (the borders are just there to show the elements heights).</p>
  
  <p>The height of the title <code>&lt;div&gt;</code> should shrink to match that of the <code>&lt;p&gt;</code> element. Anybody know how to do this?</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>#header {
      background: #526272;
      width: 100%;
      max-width: 100vw;
      height:auto;
      position: fixed;
      text-align: center;
      display: -webkit-box;
      display: -moz-box;
      display: -ms-flexbox;
      display: -webkit-flex;
      display: flex;
      justify-content: space-around;
      flex-flow: row wrap;
      -webkit-flex-flow: row wrap;
      align-items: center;
      color:white;
  }
  
  html {
      margin: 0;
      font-family: 'Raleway', sans-serif;
  }
  
  body {
      margin: 0;
  }
  
  #title {
      text-align: center;
      padding: 1em;
      vertical-align: middle;
      font-family: 'Oswald', sans-serif;
      font-size: 2em;
      border-right: solid red;
      width: auto;
      height: auto;
  }
  
  p {
      border-right: solid blue;
  }
  
  #menuBar {
      height: 100%;
      position: relative;
      text-align: center;
      display: block;
      padding: 1em;
      vertical-align: middle;
      
  }
  
  #social {
      height: auto;
      position: relative;
      text-align: center;
      display: block;
      padding: 1em;
      vertical-align: middle;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
      &lt;div id="header"&gt;
      &lt;div id="title"&gt;&lt;p&gt;EXAMPLE SITE NAME&lt;/p&gt;&lt;/div&gt;
      &lt;div id="menuBar"&gt;&lt;p&gt;Menu&lt;/p&gt;
      &lt;/div&gt;
      &lt;div id="social"&gt;&lt;p&gt;Socials&lt;/p&gt;&lt;/div&gt;
    &lt;/div&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>