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

Sun, Earth, and Code Forum

View Course » View Exercise

218 points
388cf554468d7d490f5871098d7db3fa?s=140&d=retro
Submitted by
yogogogo
about 2 years ago

2/7 WHAT IS WRONG I DONT KNOW WHAT IM DOING!!!!

<body>
    <!-- Right below is an image of the sun -->
    <img id="sun" src="http://goo.gl/PmbqZa">
#sun {
position: absolute;
/* Positions the top-left corner of the image to be *
/* in the middle of the box */
top: 50%;
left: 50%;    
    <!-- Insert the 'earth' on the next line -->



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


1 vote

permalink

The CSS style sheet should lok like this:

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;
}
#earth {
position: absolute;
top: 25%;
left: 25%;
}
#earth-orbit {
/
For Section #2 */
}

328 points
72e7058cc377c621eba9375957fbb4ec?s=140&d=retro
Submitted by
Anaïs Delfau
about 2 years ago

2 Comments

55ca9a9c9113cb419400037d_62887239 Brett Swanson almost 2 years ago

My css.style sheet looks just like this, but i'm still getting the stupid unanswerable question "Did you add position: absolute to your #earth style?" - YES! I bloody did! Please help, i have read other answers but they all say the same.

55ca9a9c9113cb419400037d_62887239 Brett Swanson almost 2 years ago

Forget that^^... I've worked it out. It was a very small type error on my behalf, I had typed a ; instead of : after the word position. :) :) :)