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

116 points
Submitted by
Megan Rodriguez
almost 5 years ago

Why does my code not work?

The index tab has:

div id='earth-orbit'
img id='earth' src=""

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


Your index.html should look like this.

    <!-- Right below is an image of the sun -->
    <img id="sun" src="">

    <img id="earth" src="">


546 points
Submitted by
almost 5 years ago