[CSS] Centering Text (Vertically & Horiziontally)

PHOTO EMBED

Fri Sep 10 2021 12:29:54 GMT+0000 (Coordinated Universal Time)

Saved by @clumsycoder #css #design #center

/* Vertically Centering Text */
.parent {
  position: relative;
}

.child {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

/* Horizontally Center */
.text {
  text-align: center;
}
content_copyCOPY