Flexbox - Image overflowing
<p>I'm trying to create a flex container that has 2 items in it - a text div and an image div. </p>

<p>However I'm having real problems keeping the image within the container itself. When I resize the browser to a small width the image just overflows out of the container and I can't seem to understand why it is happening. Surely the items should stay within their container?</p>

<p>Code is here:</p>

<pre><code>&lt;div class="featured-blog"&gt;
  &lt;div class="featured-blog-main"&gt;
&lt;h2&gt;Featured Blog&lt;/h2&gt;

  &lt;div class="blog-flex"&gt;

 &lt;div class="blog-text"&gt;
   &lt;h3&gt;Easter Island&lt;/h3&gt;
   &lt;p&gt;Turpis sed tempus integer erat, pellentesque tortor nisl, eros viverra, integer vehicula taciti sapien sed nisl dui, nec litora tincidunt cum non lobortis sollicitudin. Et odio duis cum magna pretium. Enim augue odio. Non nec velit sed lacus in. Enim vitae pellentesque nec phasellus, quis in vitae, leo in eros donec, pede volutpat. Donec nunc mi vel, quis malesuada, sed proin curabitur orci ipsum volutpat, eu eu id blandit ultricies sodales&lt;/p&gt;&lt;/div&gt; 

    &lt;div class="blog-img"&gt; &lt;img src="http://www-tc.pbs.org/wgbh/nova/assets/img/fate-of-easter-island/image-01-large.jpg"&gt;&lt;/div&gt;

  &lt;/div&gt; &lt;!-- blog-flex--&gt;
    &lt;/div&gt; &lt;!-- featured-blog-main --&gt;
  &lt;/div&gt;   &lt;!--featured-blog --&gt;



.featured-blog {
 margin: 0 60px;
 padding: 100px 0;
 border-top: 2px solid gainsboro; }

.blog-flex {
 display: flex;  }

.blog-text {
margin: 0 30px; }
</code></pre>

<p>The codepen is here:</p>

<p><a href="http://codepen.io/reskk/pen/ALdpbz" rel="noreferrer">http://codepen.io/reskk/pen/ALdpbz</a></p>

<p>I've done some looking around and tried a few solutions: using flex-basis, flex-grow etc. and none seem to work. </p>

<p>Is there a way for me to make these two divs responsive whilst keeping them <strong>inside</strong> their flex container?</p>

<p>Or if I'm doing something wrong in the way I've set it up can someone please let me know?</p>

<p>Thanks,</p>

<p>Reskk</p>