title: CSS Flex ignoring certain child elements
body: <p>I'm pretty new to learning CSS and flex, and I'm having some difficulty with some of my flex containers. I'll put my code below, but essentially: the child elements of the flex container are divs, each containing an image with a subtitle below. These divs are also flex elements themselves. The images load with the appropriate spacing between each other, but the subtitles are covered either partially or entirely by other images as if their dimensions are being ignored (even though they're a part of the same flex container that the images are). I feel like there's probably an easy solution to this but I can't for the life of me figure it out.</p>
  <p>Here's what I get with all of that:</p>
  <p><a href="https://i.stack.imgur.com/Kk2sZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Kk2sZ.jpg" alt="output" /></a></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>.subtitle {
    font-family: Helvetica;
    color: seashell;
    font-weight: bold;
    font-size: 25px;
  }
  
  .tea-sub {
    margin-top: 10px;
    margin-bottom: 10px;
  }
  
  #tea-containers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: space-around;
    width: 80%;
    height: auto;
    margin: 30px auto;
  }
  
  .tea {
    display: inline-flex;
    flex-direction: column;
    height: 245px;
    min-width: 300px;
    justify-content: center;
    align-items: center;
  }
  
  .tea-pic {
    height: 245px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id='tea-containers'&gt;
  
    &lt;div id='tea1' class='tea'&gt;
      &lt;img src='resources/images/img-berryblitz.jpg' alt='Fall Berry Blitz Tea' class='tea-pic'&gt;
      &lt;h4 class='subtitle tea-sub'&gt;Fall Berry Blitz Tea&lt;/h4&gt;
    &lt;/div&gt;
    &lt;div id='tea2' class='tea'&gt;
      &lt;img src='resources/images/img-spiced-rum.jpg' alt='Spiced rum tea' class='tea-pic'&gt;
      &lt;h4 class='subtitle tea-sub'&gt;Spiced Rum Tea&lt;/h4&gt;
    &lt;/div&gt;
    &lt;div id='tea3' class='tea'&gt;
      &lt;img src='resources/images/img-donut.jpg' alt='donuts' class='tea-pic'&gt;
      &lt;h4 class='subtitle tea-sub'&gt;Seasonal Donuts&lt;/h4&gt;
    &lt;/div&gt;
  
  
    &lt;div id='tea4' class='tea'&gt;
      &lt;img src='resources/images/img-myrtle-ave.jpg' alt='myrtle ave tea' class='tea-pic'&gt;
      &lt;h4 class='subtitle tea-sub'&gt;Myrtle Ave Tea&lt;/h4&gt;
    &lt;/div&gt;
    &lt;div id='tea5' class='tea'&gt;
      &lt;img src='resources/images/img-bedford-bizarre.jpg' alt='bedford bizarre tea' class='tea-pic'&gt;
      &lt;h4 class='subtitle tea-sub'&gt;Bedford Bizarre Tea&lt;/h4&gt;
    &lt;/div&gt;
  
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>