Keep getting "Did you add 'position:absolute;' to your #earth-orbit style?" :(


#1

This is what I have coded, I've checked it multiple times and have gone through other threads here but still no luck.. would appreciate the help :confused:
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: 400px;
width: 400px;
margin-top: -100px; 
margin-left: -100px;

border-color: yellow;
border-width: 20px;
border-style: solid;
border-radius: 50%;
box-shadow: 0 0 128px orange;

}

earth {

/* Style your earth */
position: absolute;
top: 25%;
left: 20%;

height: 400px;
width: 400px;
margin-top: -00px; 
margin-left: -100px;

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

box-shadow: 0 0 128px white;

earth {

/* Style your earth */
position: absolute;
top: 0;
left: 50%;

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

}

earth-orbit {

/* For Section #2 */
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%;

}


#2

Next time you post code try to do three back ticks(located above the tab key). On top of and under the code. Then you won't make #sun{ and #earth{ bold. This works because of MarkDown Syntax (I learned that from a couple of kind people on Codecademy). I can tell you didn't use it or at least didn't do it correctly. As for your code, try posting it with backticks and post the link to the exercise some people might like that, also tell us your error. I am sort of a beginner but I might be able to help.


#3

Thanks for the reply! I decided to start learning python , rather than batting my head with making an orbiting universe lol. I saved the link you posted that way I can go back that lesson once I feel I've got the basics down. I honestly had no idea what I was doing on the earth-orbit lesson but I feel like I'm really picking up the gist of it all! :smile:

Hope your coding is coming along well!


#4

@pvmsupra Python and CSS are very different. If you're planning on learning the basics of CSS from a Python course, just know that it's not going to happen.


#6

@pvmsupra

Thank you!

You too! The sun, earth, code lesson isn't that bad.

@zystvan
I agree, Python is imperative and the CSS is declarative(according to my research).