title: Flexbox - Horizontal component with full height squared image
body: <p>I try to achieve what seems to be a very easy task with flexbox, but after hours, I fail...</p>
  
  <p>I just want to create a <strong>responsive</strong> horizontal component with <strong>an image on the left</strong> who always be <code>100%</code> height and some flexible width <strong>text on the right</strong>.</p>
  
  <p>Should be easy, but the image never stops overlapping in the best case...</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>body {
    font-family: sans-serif;
  }
  
  .card {
    background: #F1F1F2;
    display: flex;
  }
  
  .card-img {
    border: 1px solid green;
  }
  
  img {
    display: block;
    height: 100%;
    width: auto;
  }
  
  .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid blue;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="card"&gt;
    &lt;div class="card-img"&gt;
      &lt;img src="http://placehold.it/100x100" alt="Card image"&gt;
    &lt;/div&gt;
    &lt;div class="card-body"&gt;
      &lt;h4 class="card-title"&gt;Card title&lt;/h4&gt;
      &lt;p class="card-text"&gt;Some amazing content lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>