This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Sun, Earth, and Code Forum

View Course » View Exercise

536 points
53cef7ce80ff33b5520003d1_662227041
Submitted by
jenserik
over 3 years ago

5/7 & 6/7 create orbits; Same error message

I feel as though I have completed the whole thing through 6/7, but the same

"Oops, try again. Did you add 'position: absolute;' to your #earth-orbit style?"

pops up every time. So went ahead to 6/7, however the problem persists.

Does anyone see anything wrong? Is there a simpler way to code-check than line-by-line?

html, body {
/* The universe takes up all available space */
width: 100%;
height: 100%;

/* The universe is black */
background-color: black;

}

#sun {
position: absolute;
/* Positions the top-left corner of the image to be *
/* in the middle of the box */
top: 50%;
left: 50%;

/* Play with these numbers to see what it does */
height: 200px;
width: 200px;
margin-top: -100px;
margin-left: -100px;
border-color: orange;

border-width: 2px;
border-style: solid;
border-radius: 50%;
box-shadow: 0 0 64px yellow;
}

#earth
{
/* Style your earth */
position: absolute;
top: 0%;
left: 50%;
border-color: #009900;
border-width: 2px;
border-style: solid;
border-radius: 50%;
box-shadow: 0 0 55px #009900;
height: 50px;
width: 50px;
margin-left: -25px;
margin-top: -25px;

}
#earth-orbit
{
position: absolute;
top: 50%;
left: 50%;
width: 500px;
height: 500px;
margin-top: -250px;
margin-left: -250px;

border-width: 2px;
border-style: dotted;
border-color: white;
border-radius: 50%;
-webkit-animation: spin-right 10s linear infinite;
-moz-animation: spin-right 10s linear infinite;
-ms-animation: spin-right 10s linear infinite;
-o-animation: spin-right 10s linear infinite;
animation: spin-right 10s linear
}
@-webkit-keyframes spin-right {
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}

@keyframes spin-right {
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}


0 votes

permalink

did you use the "css.style" editor? On the tab on top, you will see index.html and style.css for 5/7 they want you to use "style.css". It should work in that format.

611 points
5413afff80ff33f747001446_443764009
Submitted by
Chad Krueger
over 3 years ago

3 Comments

5567cb17ba0c59744dddd999d9368ada?s=140&d=retro Sean Robinson over 3 years ago

It doesn't though. I have the same problem

5567cb17ba0c59744dddd999d9368ada?s=140&d=retro Sean Robinson over 3 years ago

Please help

Picture Karolina Nihil about 3 years ago

i have the same problem


0 votes

permalink

i dropped in the same code and it works haha

1096 points
535cf8698c1ccc9043000ea6_575682579
Submitted by
Jackie Chung
over 3 years ago