Answers for "how to make item center in css"

CSS
89

center a div in css

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

how to make things center using css

// add to the parent element
.parent{
  	height:100vh;
	display:flex;
  	justify-content: center;
  	align-items: center;
}
or you can use 
// add to the parent element
.parent{
  	height:100vh;
	display:gird;
  	place-item:center;
}
Posted by: Guest on May-18-2021
-1

how to put container in center of page

#container
{
    width: 400px;
    margin-left: auto;
    margin-right: auto;
}
Posted by: Guest on November-09-2020
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