CSS Property:
margin:

Result:
myBox
CSS Code:

div#myBox {
  background-color:red;
  margin:auto;
}
  
Click the property values above to see the result
W3Schools.com - Play it