I think i wrote the correct answer to the exercise but it says it is wrong

I don’t understand the issue, someone please help here. the exercise was only to write “margin: auto;” i did it, but it says it is wrong and wont let me get through… what is wrong?

  **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 (X11; CrOS aarch64 14150.87.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.124 Safari/537.36

Challenge: Center an Element Horizontally Using the margin Property

Link to the challenge:

@akash403,

Your code works perfectly fine for me. It would be great if you share us the warning you get from your code.

Hi @akash403 and welcome to the forum!!!
I tried your code and I passed the test.
Have you already tried disabling extensions like Dark Mode and Ad-Blockers?
These can interfere with tests, and remember to set the browser zoom to 100%. :wave:

Thanks !!
I had totally forgotten about the Ad-Blocker. Thanks a lot, i’m gonna be more mindful of that in the future :grinning_face_with_smiling_eyes:

1 Like