CodePen

HTML

            
              <div class="outer">
  <div class="image"></div>
  <div class="text">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus lectus massa, pulvinar at iaculis sed, feugiat in sem. In faucibus lorem vel lectus vehicula ut dignissim libero suscipit. Quisque convallis nunc a ipsum gravida egestas. Fusce ipsum felis, laoreet eu placerat ac
  </div>
</div>
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              .outer{
  border:2px solid blue;
  padding:10px;
  width:auto; 
  background:green;
  .image{
    width:300px;
    height:100px;
    background:red;
  }
  .text{
    width:100%;
    background:yellow;
  }
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

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