Ajax-loader-large-white
Sun, Earth, and Code
Position the Sun and Earth

The position of the Sun and Earth are not quite right. Let's position the planets in our solar system.

Tell the web browser to use a grid to layout the Sun and Earth.


To illustrate, the following will position #earth:

  • 25% from the top
  • 25% from the left
#earth {
    /* Style your earth */
    position: absolute;
    top: 25%;
    left: 25%;
}
Instructions

Edit your style.css to look like this:

#earth {
    /* Style your earth */
    position: absolute;
    top: 25%;
    left: 25%;
}

Play with the top and left values for both the #sun and #earth! Get a feel for it.

index.html
style.css
project
View Preview