Answers for "how to center align a container"

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 center a div

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

how to center a div

.div {
	width: 80%;
    margin: auto;
}
Posted by: Guest on September-27-2021
1

how to center a div

It's normal to not know how to center a div, just copy and learn from the codes below
Posted by: Guest on August-11-2021

Code answers related to "how to center align a container"

Browse Popular Code Answers by Language