<div id="parent">
  <div id="child"></div>
</div>
#parent {
  height: 200px;
  width: 500px;
  background-color: #ccc;
}

#child {
  width: 25%;
  height: 30%;
  background-color: #ff2222
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.