CodePen

HTML

            
              <div class="parent">
  <div class="child">
      Sup<br>
      Sup<br>
      Sup<br>
      Sup<br>
      Sup<br>
      Sup<br>
  </div>
</div>
            
          
!
via HTML Inspector

CSS

            
              *
{
  box-sizing: border-box;  
}

.parent
{
  position: relative;
  width:500px;
  height:100px;
  background:#000;
}

.child
{
  color:#FFF;
  position: absolute;
  top: 5px;
  left:5px;
  padding:10px;
  background: red;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              heightblock = $('.child').height();
$('.parent').height(heightblock+30);  //  top + bottom gutter + padding top + padding bottom = 5 + 5 + 10 + 10 = 30
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................