How To Center A Div

Source URL: https://www.w3schools.com/css/css_align.asp

Language: css

Created on: 2021-08-31 16:12:15

.MyDiv{
  	display: block;
  	margin-left: auto;
	margin-right: auto;
}
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
content_copy