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

.child {
	display: inline-block;
	background: red;
	padding-top: 50%;
	padding-left: 50%;
}































// GRID OVERLAY
.parent {
	position: relative;
}
.parent::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.