Project: Space and Photo Cards
Instructions

Make the header a banner

Step 1 of 4
Make the header a banner with space around it. Padding is space inside an element, margin is space outside it.

Instructions

In style.css:

  • In the body { rule, set margin: 0.
  • In the #hero { rule, add padding: 56px 48px 120px and margin: 16px.
Example solution
  • Find the rule that starts with body {. Write these lines inside it, before its }:
    margin: 0;
  • Find the rule that starts with #hero {. Write these lines inside it, before its }:
    padding: 56px 48px 120px;
    margin: 16px;
How it works

Give the sections room

Step 2 of 4
Give the sections room, so they look like tiles.

Instructions

In style.css:

  • In the .section { rule, add padding: 40px and margin: 16px.
Example solution
  • Find the rule that starts with .section {. Write these lines inside it, before its }:
    padding: 40px;
    margin: 16px;
How it works

Make photo cards

Step 3 of 4
Make the photos into cards of the same size.

Instructions

In style.css:

  • In the .card { rule, add width: 250px, padding: 12px, margin-bottom: 16px and border: 1px solid #E2E8F0.
  • After the } of the .card rule, write a new rule for .card img with width: 100%.
Example solution
  • Find the rule that starts with .card {. Write these lines inside it, before its }:
    width: 250px;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #E2E8F0;
  • Find the } that ends the .card rule. After that }, write this new rule:
    .card img {
      width: 100%;
    }
How it works

Round the corners

Step 4 of 4
Round the corners of the header, the sections, the cards and the photos.

Instructions

In style.css:

  • Add border-radius: 28px to the #hero { and .section { rules, border-radius: 20px to .card { and border-radius: 14px to .card img {.
  • At the end of style.css, write a rule for blockquote with border-left: 4px solid #2563EB, padding-left: 24px and margin: 0.
Example solution
  • Find the rule that starts with #hero {. Write these lines inside it, before its }:
    border-radius: 28px;
  • Find the rule that starts with .section {. Write these lines inside it, before its }:
    border-radius: 28px;
  • Find the rule that starts with .card {. Write these lines inside it, before its }:
    border-radius: 20px;
  • Find the rule that starts with .card img {. Write these lines inside it, before its }:
    border-radius: 14px;
  • At the end of style.css, after all the other rules, write:
    blockquote {
      border-left: 4px solid #2563EB;
      padding-left: 24px;
      margin: 0;
    }
How it works
Click Submit to grade your project.