Oops, try again. Did you remember to set the <div>'s margin to auto?


#1

div {
Margin: auto;
height: 50px;
width: 100px;
border: 2px solid black;
border-radius: 5px;
background-color: #308014;
}


#2

Hi
could you try "margin" instead of "Margin"?
Cheerio


#3
  • {
    border: 1px dashed black;
    }

div {
height: 50px;
width: 100px;
border: 2px solid black;
border-radius: 5px;
background-color: #308014;
margin : auto;
}

I am getting the same error message as the OP.


#4

I won't tell you the exact answer because you learn more if you'll find out it yourself.
There is unnecessary space between property and value. Check that out. If it doesn't work I suggest you to test it with other web browser.

for example: background-color :"#FF0000";

Remember to set your browser zoom setting to 100% (ctrl + 0 or cmd + 0 for mac).


#5

actually @rubyblaster60826 You don't put quotes " " around your color


#6

That's true, my bad. :slight_smile:


#7

It doesn't matter if you have space in between the property and value -- in fact, that is STANDARD for readability. It also doesn't matter if you use another browser -- it still throws the same error. The same error that it threw back in 2013 when I first took this course for free!! You would think Pro would mean NO BUGS!!

EDIT: I went back and refreshed, the code was deleted. I re-entered it EXACTLY THE SAME AS BEFORE, and it went through just fine. Codecademy needs to iron out the bugs already!


#8

#9