Answers for "how to div align 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
0

how to center a div

.container {
  ...
  display: flex;
  justify-content: center;
}
Posted by: Guest on February-02-2021
0

how to center a div

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

how to center a div

margin:auto
Posted by: Guest on August-13-2020

Browse Popular Code Answers by Language