Project: Color the Journal
Instructions

Paint the page

Step 1 of 4
Give the whole page a color. All the CSS goes into the style.css tab.

Instructions

In style.css:

  • In style.css, write a rule for body.
  • Give it a light background-color and a dark text color.
Example solution
  • In style.css, write this rule:
    body {
      background-color: #EEF0F3;
      color: #334155;
    }
How it works

Put a photo behind the header

Step 2 of 4
Put a photo of Cinque Terre behind the header. In CSS, #hero finds the element with id="hero".

Instructions

In style.css:

  • At the end of style.css, write a rule for #hero.
  • Add a background-image with url(). Use the photo of the first card in index.html, cinqueterre.jpg: copy its full address, with https:// and straight quotes.
  • Add background-size: cover, background-position: center and color: white.
Example solution
  • At the end of style.css, after all the other rules, write:
    #hero {
      background-image: url("https://www.w3schools.com/w3images/cinqueterre.jpg");
      background-size: cover;
      background-position: center;
      color: white;
    }
How it works

Color headings, links and the menu

Step 3 of 4
Color the headings, the links and the menu. One rule can style more than one element.

Instructions

In style.css:

  • At the end of style.css, give h2, h3 (one rule, with a comma) a dark color.
  • Give a a color that stands out.
  • Give .navbar background-color: white.
Example solution
  • At the end of style.css, after all the other rules, write:
    h2, h3 {
      color: #0F172A;
    }
    a {
      color: #2563EB;
    }
    .navbar {
      background-color: white;
    }
How it works

Color the sections

Step 4 of 4
Give each section its own color.

Instructions

In style.css:

  • At the end of style.css, give .section a white background-color.
  • Give #quote a dark background-color and color: white.
  • Write a rule for #subscribe and a second rule for .card, each with a light background-color.
Example solution
  • At the end of style.css, after all the other rules, write:
    .section {
      background-color: white;
    }
    #quote {
      background-color: #0F172A;
      color: white;
    }
    #subscribe {
      background-color: #E0EAFF;
    }
    .card {
      background-color: #F8FAFC;
    }
How it works
Click Submit to grade your project.