Answers for "css align text vertically and horizontally in div"

CSS
10

css center

/* this will center all children within the parent element. */
.parent {
  display: flex;
  justify-content: center; /* horizontal */
  align-items: center; /* vertical */
}
Posted by: Guest on May-17-2020
1

center css elements

body{
  display: grid;
  place-items: center;
}
Posted by: Guest on November-11-2020

Code answers related to "css align text vertically and horizontally in div"

Browse Popular Code Answers by Language