Answers for "centre div vertically and horizontally"

1

centre div vertically and horizontally

.name-of-div-to-be-centered {
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}
Posted by: Guest on February-07-2022

Code answers related to "centre div vertically and horizontally"

Browse Popular Code Answers by Language