* { box-sizing: border-box; } body { background-color: #212121; } .container { max-width: 40em; margin: 0 auto; } .panels:after { content: ""; display: table; clear: both; } .panel { float: left; width: 23%; padding-bottom: 20%; border-radius: 5%; border-style: solid; border-width: 0.5em; position: relative; margin: 1%; box-sizing: border-box; } .panel-label { position: absolute; color: white; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 2em; width: 110%; text-align: center; } p { color: white; font-size: 2em; margin: 0.25em; }