Answers for "how to make div center align in html"

CSS
3

how to center a div

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

div align center

.center {
  text-align: center;
}

// or

<div style="text-align:center">
</div>
Posted by: Guest on February-17-2021

Code answers related to "how to make div center align in html"

Browse Popular Code Answers by Language