Answers for "how to set something to the center using 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

Code answers related to "how to set something to the center using css"

Browse Popular Code Answers by Language