auto
to horizontally center the element within its container.
The element will then take up the specified width, and the remaining space will be split equally between the left and right margins:
Example
div {
width: 300px;
margin:
auto;
border: 1px solid red;}
No comments:
Post a Comment