Center an Element Horizontally Using the margin Property

Center an Element Horizontally Using the margin Property
0

#1

Tell us what’s happening:

Your code so far


<style>
  div {
    background-color: blue;
    height: 100px;
    width: 100px;
    margin : auto;
  }
</style>
<div></div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/applied-visual-design/center-an-element-horizontally-using-the-margin-property


#2

Try to remove the spaces :wink:


#3

You saved me …Thanks DUDE