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

Sun, Earth, and Code Forum

View Course » View Exercise

116 points
D13be5d2ae2e7e339cdcdda7e0fd607b?s=140&d=retro
Submitted by
Megan Rodriguez
about 3 years ago

Why does my code not work?

The index tab has:

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

And the style tab has:

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

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%;

}

Why doesn't my code work?
I have these <> in the index tab


1 vote

permalink

Your index.html should look like this.

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

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


</body>

546 points
Ed1b18e4f3b98d468a2f3c2a83a2872f?s=140&d=retro
Submitted by
davidjbliss
about 3 years ago