Answers for "set container to center css"

CSS
90

center a div in css

.container {
  display: flex;
  justify-content: center;
  align-items: center;
}
Posted by: Guest on September-09-2020
7

center a div css

.center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
Posted by: Guest on March-31-2021
0

how to center anything inside your container

display: grid;
    place-items: center;
    height: 100vh;
Posted by: Guest on September-06-2020

Browse Popular Code Answers by Language