<body>
  <div class="absolute"><strong>ABSOLUTE UNIT</strong></div>
  <div class="relative"><strong>RELATIVE UNIT</strong></div>
</body>
.absolute,
.relative {
  font-size: 1.2rem;
}

.absolute {
  background-color: green;
  width: 640px;
  height: 100px;
}

.relative {
  background-color: red;
  width: 90%;
  height: 6em;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.