i got an error but i don’t know why?
error
Oops, try again. Did you remember to set the <div>'s margin to auto?
my code
index.html
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
<title>Result</title>
</head>
<body>
<div></div>
</body>
</html>
stylesheet.css
* {
border: 1px dashed black;
}
div {
height: 50px;
width: 100px;
border: 2px solid black;
border-radius: 5px;
background-color: #308014;
margin : auto;
}
oh wow, SCT is being nasty again. You can’t have a space between margin and :
2 Likes
Dude that space had ruined my life … you are my saviour. @stetim94
What if you don’t have a space between margin and the colon and are still getting that error? I have tried every fix known to mankind and 3 different browsers and I’m still getting this error. I don’t remember what I did back in 2013 to get around this error!
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!
Please make a new topic (not a reply to a existing topic), with your code (html + css), the error message and your question so we can help you, thank you 