<div id="box" class="percentage">The box height is set in percentage.</div>

<div id="box" class="pixel">The box height is set in pixel.</div>
#box{
  font-family: Helvetica, Arial, sans-serif;
  font-size: 16px;
  width: 200px;
  padding: 10px;
  color: #FFFFFF;
  margin: 10px;
  display: inline-block;
}

#parent {
  height: 200px;
}

.percentage {
   height: 100%;
   background-color: #9EDBFE;
}

.pixel {
   height: 200px;
   background-color: #FEA97E;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.