<!-- More details in this article:
https://dev.to/5t3ph/guide-to-css-units-for-relational-spacing-1mj5 -->
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
body {
	display: flex;
	flex-direction: column;
	align-items: center;
	background-color: rebeccapurple;
}

div {
	color: #797979;
	background-color: #fff;
	border-radius: 4px;
	width: 80%;
	text-align: center;
	
	// rem spacing
	font-size: 3rem;
	margin: 2rem auto;
	padding: 2rem;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.