Center an Element Horizontally Using the margin Property

Tell us what’s happening:

Your code so far

  div {
    background-color: blue;
    height: 100px;
    width: 100px;
    margin : auto;

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:

Try to remove the spaces :wink:

You saved me …Thanks DUDE


what spaces, where ?

Hey @himansh_107, welcome to the forum! :grinning:

what spaces, where ?

The spaces between the properties (height, width, … ), the semicolons and the values (blue, 100px,…)^^