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

Sun, Earth, and Code Forum

View Course » View Exercise

100 points
59c4a89f9e847109e6000740_534416579
Submitted by
kawamau75
over 2 years ago

Why won't my pictures show on the planets

Here's the code for it:

<body>

    <img id="sun" src="file://localhost/Users/NameHere/Desktop/Codecademy/My%20Solar%20System/Sun.png">

<div id='earth-orbit'>
    <img id="earth" src="file://localhost/Users/NameHere/Desktop/Codecademy/My%20Solar%20System/Earth.png">
</div>

    <img id="moon" src="file://localhost/Users/NameHere/Desktop/Codecademy/My%20Solar%20System/Moon.png"

The computer i'm using is a Macintosh Pro 1.0, if that helps.


0 votes

permalink

Hi,

Are you writing those src-paths in the web editor here at codecademy? If so you should probably change the paths to the ones provided in the exercise (ex. http://goo.gl/41IWnf).

If you are doing the exercise locally on your machine make sure that the path is actually correct. As I don't use a Mac I'm not sure how paths are formatted. Is that where you find the file if you go through the Finder (seem to recall that being the name of the Mac "Explorer").

Is the "file://" prefix necessary? It seems you are trying to point to a server address with "localhost/", perhaps you are running XAMPP (or something similar) in which case I would make sure the server is running and remove "file://".

I had the same problem running the exercise in the web editor though. For some reason my antivirus software flagged the page as suspicious and didn't let the images through. Running Trend Micro and had to ask the program to reevaluate the site (could have made an exception as well).

Hope it helped!

1268 points
930d81403af6749e91d433d766e52943?s=140&d=retro
Submitted by
Christian Eriksson
over 2 years ago