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

Sun, Earth, and Code Forum

View Course » View Exercise

535 points
5231a30a80ff339cb1006250_470577012
Submitted by
leah lee
about 3 years ago

why won't it WORK!!!!!!!!!!!!!

This is my code:



<body>
    <!-- Right below is an image of the sun -->
    <img id="sun" src="http://goo.gl/dEEssP">

    <!-- Insert the 'earth' on the next line -->
    <img id="earth" src="http://goo.gl/o3YWu9">

    <img id="earth">

#earth {
position: absolute;
top: 0;
left: 50%;

height: 50px;
width: 50px;
margin-left: -25px;
margin-top: -25px;

border-color: blue;
border-width: 8px;
border-style: solid;
border-radius: 50%;

box-shadow: 0 0 128px green;

}
#sun {
position: absolute;
top: 50%;
left: 50%;

height: 200px;
width: 200px;
margin-top: -100px; 
margin-left: -100px;

border-color: orange;
border-width: 8px;
border-style: solid;
border-radius: 50%;

box-shadow: 0 0 128px red;

}
#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 infinite;

}

@-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);
}
}

even though i have put the code in the style.css part it says
Oops, try again. Add the animation code from the instructions to the "style.css" tab.


0 votes

permalink

In your index.html edit the earth image so it is:

<div id="earth-orbit">
    <img id="earth" src="http://goo.gl/o3YWu9">
</div>

step 4/7

i think that'll help

45 points
5353f675631fe928170019fd_993537731
Submitted by
Ana Paulina
about 3 years ago