Position of the Sun and Earth lesson


#1

I am getting this error message:

Did you add 'position: absolute;' to your #earth style?

This is my code:
Did I put the code in the right place?

<html>
    <head>
        <link rel="stylesheet" href="style.css" />
    </head>
    <body>
    #earth {
        /*Style your earth*/
        position: absolute;
        top: 25%;
        left: 25%;
        <!-- Right below is an image of the sun -->
        <img id="sun" src="http://goo.gl/PmbqZa">
        
        <!-- Insert the 'earth' on the next line -->
        <img id="earth" src="http://goo.gl/41IWnf"
    </body>
    </html>

#2

I don't think the code copied over correctly.

In what position is the code supposed to be in?


#3

Hi

did you close your <img> by a closing > ? In the code that you gave, it is not the case.

Your css code for the Earth seems correct.
Cheerio


#4

That did help. I am still getting the error message, though.

I have the bracket on the right side of the language, also.

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 -->
img id="earth""earth" src="http://goo.gl/41IWnf">
}
earth {
/Style your earth */
position: 25%;
top: 25%;
left: 25%;
}
/body>
/html>

Does the style the earth code go under the earth image code?


#5

Hi
sorry for the late reply
mmm your code seems to be missing all the opening < in the html but I suppose that it didn't copy correct in your message.
In your css file, did you use `#earth` (with the #) to refer to the id of Earth? The position of Earth should be `absolute` as stated by the error message, and not equal to `25%`

The code for the style goes into the css file, not in the html code

I hope that it will help
Cheerio