Answers for "centering elements in the centre"

CSS
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

center css elements

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

Code answers related to "centering elements in the centre"

Browse Popular Code Answers by Language