<div class="relative">
  <h1>My position is relative!</h1>
  <p>I can move around using <pre>top, right, bottom and left</pre>and my pink friend below won't even mind.</p>
<div class="normal">
  <h1>My position is by default, so it's static!</h1>
  <p>I'm chill no matter what the yellow dude upstairs does, I go with the (document) flow.</p>
.relative {
  background-color: LemonChiffon;
  position: relative;
  /* Offset properties */
  top: 20px;
  left: 30px;

.normal {
  background-color: pink;

body {
  font-family: roboto, sans-serif;
  padding: 50px;

div {
  width: 400px;
  margin: 0 auto;
  padding: 10px;
  text-align: center;

pre {
  font-weight: bold;
  font-size: 16px;
  line-height: 5px;

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.