<div class="grandparent">
  <div class="parent">
    <div class="child"></div>
  </div>
</div>
.grandparent {
	position: relative;
	width: 200px;
	height: 200px;
	background: #eaeaea;
}

.parent {
	// position: relative;
	width: 100px;
	height: 100px;
	background: #aaa;
}

.child {
	position: absolute;
	width: 50%;
	height: 50%;
	top: 25%;
	left: 25%;
	background: red;
}

































// GRID OVERLAY
.grandparent {
	position: relative;
}
.grandparent::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99;
	background: radial-gradient(circle at 1px 1px,#000 2px,transparent 0);
	background-size: 49.5px 49.5px;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.