Learn Typography by Building a Nutrition Label - Step 65

Step 65 in this task is to “Add a medium divider after your .daily-value element. Below that new divider, create a p element with the class attribute set to note”. Also to " Give the p element the following text: “* The % Daily Value (DV) tells you how much a nutrient in a serving etc…”

I have repeatedly done as asked and constantly receive the following answer: " Your new p element should have the class set to note.
The class is set to “note” and still the code is rejected and I cannot move on to the next step - which is obviously very frustrating!!

Can anyone help me with this?

Nutrition Label

Nutrition Facts

8 servings per container

Serving size 2/3 cup (55g)

  <div class="left-container">
    <h2 class="bold small-text">Amount per serving</h2>
    <p>Calories</p>
  </div>

  <span>230</span>
</div>

<div class="divider medium"></div>

<div class="daily-value small-text">
  <p class="bold right no-divider">% Daily Value *</p>
</div>

* The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

Total Fat 8g 10%

Saturated Fat 1g 5%

Trans Fat 0g

Cholesterol 0mg 0%

Sodium 160mg 7%

Total Carbohydrate 37g 13%

Dietary Fiber 4g

Total Sugars 12g

Includes 10g Added Sugars 20%

Protein 3g

Vitamin D 2mcg 10%

Calcium 260mg 20%

Iron 8mg 45%

Potassium 235mg 6%

```
/* file: styles.css */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Open Sans', sans-serif;
}

.label {
  border: 2px solid black;
  width: 270px;
  margin: 20px auto;
  padding: 0 7px;
}

header h1 {
  text-align: center;
  margin: -4px 0;
  letter-spacing: 0.15px
}

p {
  margin: 0;
  display: flex;
  justify-content: space-between;
}

.divider {
  border-bottom: 1px solid #888989;
  margin: 2px 0;
}

.bold {
  font-weight: 800;
}

.large {
  height: 10px;
}

.large, .medium {
  background-color: black;
  border: 0;
}

.medium {
  height: 5px;
}

.small-text {
  font-size: 0.85rem;
}


.calories-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.calories-info h2 {
  margin: 0;
}

.left-container p {
  margin: -5px -2px;
  font-size: 2em;
  font-weight: 700;
}

.calories-info span {
  margin: -7px -2px;
  font-size: 2.4em;
  font-weight: 700;
}

.right {
  justify-content: flex-end;
}

.indent {
  margin-left: 1em;
}

.double-indent {
  margin-left: 2em;
}

.daily-value p:not(.no-divider) {
  border-bottom: 1px solid #888989;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0

Challenge: Learn Typography by Building a Nutrition Label - Step 65

Link to the challenge:

The bottom part of the code given in this challenge is:

      <p>Vitamin D 2mcg <span>10%</span></p>
      <p>Calcium 260mg <span>20%</span></p>
      <p>Iron 8mg <span>45%</span></p>
      <p class="no-divider">Potassium 235mg <span>6%</span></p>
   </div> ....this is the closing div tag of the .daily-value

After the closing div tag of the .daily-value you should add the div and the ‘p’ elements.

Restart step.

1 Like

Thanks for your input which I have tried… but without success. Should the code look like the following?

      <p>Iron 8mg <span>45%</span></p>
      <p class="no-divider">Potassium 235mg <span>6%</span></p>
    </div>
   <div class="divider medium"></div>
<p class="note">
  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.
  </p>
</body>
</html>```

Many thanks for your help which at first I did not fully understand - my fault. I have now seen the light, made the amendments and my code is now working and accepted. I can, at last, move on to the next challenge. Thanks again.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.