<div style="width: 50%; height: 20px; background-color: red;">
  <div style="width: 50%; height: 100%; background-color: blue;">
  </div>
</div>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.