<div class="parent">
  <div class="child">🤠</div>
</div>
.parent {
  /* Stuff that matters */
  position: relative;
  /* Style only */
  width: 200px;
  height: 200px;
  border: solid 1px;
  margin: 50px;
}

.child {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  /* Style only */
  font-size: 36px;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.