Need help!


#1

Need help on Sun, Earth, and Code. Orbit with style is the stage I need help on.


#2

Hey Michael,

We can only help you if you provide us with your code along with error message :slight_smile:


#3

<html>
    <head>
        <link rel="stylesheet" href="style.css" />
    </head>
    
    <body>
        <!-- Right below is an image of the sun -->
        <img id="sun" src="http://goo.gl/PmbqZa">
        
     
       <!-- Insert the 'earth' on the next line -->
       <div id='earth-orbit'>
     <img id="earth" src="http://goo.gl/41IWnf">   
        </div>
    </body>
</html>
Oops, try again.
Did you add 'position: absolute;' to your #earth-orbit style?

I'm helping my little brother but we are both having a hard time.


#4

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 {
    /* Style your earth */
position: absolute;
top: 25%;
left: 77%;
}

#earth-orbit {
    /* For Section #2 */
}

#5

You need to add

position: absolute;

to: