CodePen

HTML

            
              <div class="outer">
  <div class="image-wrap">
    <img src="http://lorempixel.com/400/200/sports/" alt="">
  </div>
  <div class="text-wrap">
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>  
  </div>
  
</div>

<div class="outer">
  <div class="image-wrap">
    <img src="http://lorempixel.com/600/300/sports/" alt="">
  </div>
  <div class="text-wrap">
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>  
  </div>
  
</div>

            
          
!

CSS

            
              .outer{
  border:2px solid blue;
  padding:10px;
  background:green;
  display:table;
  overflow:hidden;
  margin: 10px auto;
}

.image-wrap,
.text-wrap {
  display:table;
}

.text-wrap {
  background:yellow;
  padding:10px;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              $(document).ready(function() {
  
  function checkHeight(obj){
    obj.width(obj.children(".image-wrap").outerWidth());
  }
  checkHeight($(".outer"));
});
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................