Added solution to Center an Element Horizontally Using the margin Property (#34346)

* Update index.md

* Update index.md
This commit is contained in:
The Coding Aviator
2019-03-09 19:31:39 +05:30
committed by Randell Dawson
parent 7825751bdf
commit 4c4b7cc2cf

View File

@ -3,8 +3,16 @@ title: Center an Element Horizontally Using the margin Property
---
## Center an Element Horizontally Using the margin Property
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/responsive-web-design/applied-visual-design/center-an-element-horizontally-using-the-margin-property/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
### Solution
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
```html
<style>
div {
background-color: blue;
height: 100px;
width: 100px;
margin: auto;
}
</style>
<div></div>
```