Answers for "align middle div"

CSS
15

css align items vertical center

.parent {
  display: flex;
  justify-content: center;
  align-items: center;
}
Posted by: Guest on October-31-2020
3

how to center a div

.MyDiv{
  	display: block;
  	margin-left: auto;
	margin-right: auto;
}
Posted by: Guest on August-31-2021
0

how to assign something in center inside a div

P { text-align: center }
H2 { text-align: center }
Posted by: Guest on October-20-2020

Browse Popular Code Answers by Language