Back to Freecodecamp

Step 7

curriculum/challenges/english/blocks/workshop-greeting-card/672b42241c0c6515f26786f4.md

latest1.3 KB
Original Source

--description--

Now add a new div below the .message element. The new div should have a class attribute of card-links.

--hints--

The last element inside #greeting-card should be a div.

js
assert.strictEqual(document.querySelector("#greeting-card").lastElementChild.tagName, "DIV");

The new div should have a class of card-links.

js
assert.strictEqual(document.querySelector("#greeting-card").lastElementChild.className, "card-links");

--seed--

--seed-contents--

html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Greeting Card</title>
    <link href="styles.css" rel="stylesheet">
  </head>
  <body>
    <div class="card" id="greeting-card">
      <h1>Happy Birthday!</h1>
      <p class="message">
        Wishing you all the happiness and joy on your special day!
      </p>
      --fcc-editable-region--
      
      --fcc-editable-region--
  	</div>
  </body>
</html>
css
body {
  font-family: Arial, sans-serif;
  padding: 40px;
  text-align: center;
  background-color: brown;
}

.card {
  background-color: white;
  max-width: 400px;
  padding: 40px;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px gray;
}