My task is " Center the div on the page by adding a margin property with a value of auto." and i've done just that, but the test is not approving my task

Tell us what’s happening:
Describe your issue in detail here.

  **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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.96 Safari/537.36

Challenge: Center an Element Horizontally Using the margin Property

Link to the challenge:

Your code passes for me.

Try rebooting, clearing the browser cache, try a different browser… Also some browser extensions can mess with tests, and things like dark mode and night mode can affect color.

If none of that works, back out of that challenge and move onto the next one.

i’ll try all the options. thanks

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.