Center an Element Horizontally Using the margin Property PLEASE HELP ME

Tell us what’s happening:
I don’t know how to ‘set’ the margin to auto, I thought I already did it, but apparently I’m wrong. Please Help Me

Your code so far


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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 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

You have a typo. change “magin” to “margin”. :grinning:

1 Like

Thanks, I didn’t see that.