Learn Typography by Building a Nutrition Label - Step 62

Tell us what’s happening:
Describe your issue in detail here. step62 nutrition label
It keeps telling me this response and i cant figure it out I’ve been stuck for the past week if someone can video call and help me i’d appreciate it. “You should create a new p element at the end of your .daily-value element”.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Nutrition Label</title>
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,800" rel="stylesheet">
    <link href="./styles.css" rel="stylesheet">
  </head>
  <body>
    <div class="label">
      <header>
        <h1 class="bold">Nutrition Facts</h1>
        <div class="divider"></div>
        <p>8 servings per container</p>
        <p class="bold">Serving size <span class="right">2/3 cup (55g)</span></p>
      </header>
      <div class="divider lg"></div>
      <div class="calories-info">
        <p class="bold sm-text">Amount per serving</p>
        <h1>Calories <span class="right">230</span></h1>
      </div>
      <div class="divider md"></div>
      <div class="daily-value sm-text">

<!-- User Editable Region -->

        <p class="right bold no-divider">% Daily Value *</p>
        <div class="divider"></div>
        <p><span class="bold">Total Fat</span> 8g<span class="bold right">10%</span></p>
        <p class="indent no-divider">Saturated Fat 1g <span class="bold right">5%</span></p>
        <div class="divider"></div>
        <p class="indent no-divider"><i>Trans</i> Fat 0g</p>
        <div class="divider"></div>
        <p><span class="bold">Cholesterol</span> 0mg <span class="right bold">0%</span></p>
        <p><span class="bold">Sodium</span> 160mg <span class="right bold">7%</span></p>
        <p><span class="bold">Total Carbohydrate</span> 37g <span class="right bold">13%</span></p>
        <p class="indent no-divider">Dietary Fiber 4g</p>
        <div class="divider"></div>
        <p class="indent no-divider">Total Sugars 12g</p>
        <div class="divider dbl-indent"></div>
       <p class="dbl-indent no-divider">Includes 10g Added Sugars <span class="right bold">20%</span>
      <div class="divider"></div>
      <p class="no-divider"><span class="bold">Protein</span> 3g</p>
      <div class="divider lg"></div>
      <p>Vitamin D 2mcg <span class="right">10%</span></p>
      <p>Calcium 260mg <span class="right">20%</span></p>
      <p>Iron 8mg <span class="right">45%</span><p> 


<!-- User Editable Region -->

      </div>
    </div>
  </body>
</html>
/* 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;
}

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

.bold {
  font-weight: 800;
}

.right {
  float: right;
}

.lg {
  height: 10px;
}

.lg, .md {
  background-color: black;
  border: 0;
}

.md {
  height: 5px;
}

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

.calories-info h1 {
  margin: -5px -2px;
  overflow: hidden;
}

.calories-info span {
  font-size: 1.2em;
  margin-top: -7px;
}

.indent {
  margin-left: 1em;
}

.dbl-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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36

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

Link to the challenge:

Where did you find the instruction to add these two ‘p’ elements?

Restart step.

Read again the instruction, carefully.

I took of those two ‘p’ elements and i’m still getting the same “You should create a new p element at the end of your .daily-value element”.

Post your code here.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Nutrition Label</title>
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,800" rel="stylesheet">
    <link href="./styles.css" rel="stylesheet">
  </head>
  <body>
    <div class="label">
      <header>
        <h1 class="bold">Nutrition Facts</h1>
        <div class="divider"></div>
        <p>8 servings per container</p>
        <p class="bold">Serving size <span class="right">2/3 cup (55g)</span></p>
      </header>
      <div class="divider lg"></div>
      <div class="calories-info">
        <p class="bold sm-text">Amount per serving</p>
        <h1>Calories <span class="right">230</span></h1>
      </div>
      <div class="divider md"></div>
      <div class="daily-value sm-text">
        <p class="right bold no-divider">% Daily Value *</p>
        <div class="divider"></div>
        <p><span class="bold">Total Fat</span> 8g<span class="bold right">10%</span></p>
        <p class="indent no-divider">Saturated Fat 1g <span class="bold right">5%</span></p>
        <div class="divider"></div>
        <p class="indent no-divider"><i>Trans</i> Fat 0g</p>
        <div class="divider"></div>
        <p><span class="bold">Cholesterol</span> 0mg <span class="right bold">0%</span></p>
        <p><span class="bold">Sodium</span> 160mg <span class="right bold">7%</span></p>
        <p><span class="bold">Total Carbohydrate</span> 37g <span class="right bold">13%</span></p>
        <p class="indent no-divider">Dietary Fiber 4g</p>
        <div class="divider"></div>
        <p class="indent no-divider">Total Sugars 12g</p>
        <div class="divider dbl-indent"></div>
       <p class="dbl-indent no-divider">Includes 10g Added Sugars <span class="right bold">20%</span>
      <div class="divider"></div>
      <p class="no-divider"><span class="bold">Protein</span> 3g</p>
      <div class="divider lg"></div>
      <p>Vitamin D 2mcg <span class="right">10%</span></p>

      </div>
    </div>
  </body>
</html>
1 Like
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Nutrition Label</title>
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,800" rel="stylesheet">
    <link href="./styles.css" rel="stylesheet">
  </head>
  <body>
    <div class="label">
      <header>
        <h1 class="bold">Nutrition Facts</h1>
        <div class="divider"></div>
        <p>8 servings per container</p>
        <p class="bold">Serving size <span class="right">2/3 cup (55g)</span></p>
      </header>
      <div class="divider lg"></div>
      <div class="calories-info">
        <p class="bold sm-text">Amount per serving</p>
        <h1>Calories <span class="right">230</span></h1>
      </div>
      <div class="divider md"></div>
      <div class="daily-value sm-text">

<!-- User Editable Region -->

        <p class="right bold no-divider">% Daily Value *</p>
        <div class="divider"></div>
        <p><span class="bold">Total Fat</span> 8g<span class="bold right">10%</span></p>
        <p class="indent no-divider">Saturated Fat 1g <span class="bold right">5%</span></p>
        <div class="divider"></div>
        <p class="indent no-divider"><i>Trans</i> Fat 0g</p>
        <div class="divider"></div>
        <p><span class="bold">Cholesterol</span> 0mg <span class="right bold">0%</span></p>
        <p><span class="bold">Sodium</span> 160mg <span class="right bold">7%</span></p>
        <p><span class="bold">Total Carbohydrate</span> 37g <span class="right bold">13%</span></p>
        <p class="indent no-divider">Dietary Fiber 4g</p>
        <div class="divider"></div>
        <p class="indent no-divider">Total Sugars 12g</p>
        <div class="divider dbl-indent"></div>
       <p class="dbl-indent no-divider">Includes 10g Added Sugars <span class="right bold">20%</span>
      <div class="divider"></div>
      <p class="no-divider"><span class="bold">Protein</span> 3g</p>
      <div class="divider lg"></div>
      <p>Vitamin D 2mcg <span class="right">10%</span></p>
      <p>Calcium 260mg <span class="right">20%</span></p>
      <p>Iron 8mg <span class="right">45%</span><p> 


<!-- User Editable Region -->

      </div>
    </div>
  </body>
</html>
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Nutrition Label</title>
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,800" rel="stylesheet">
    <link href="./styles.css" rel="stylesheet">
  </head>
  <body>
    <div class="label">
      <header>
        <h1 class="bold">Nutrition Facts</h1>
        <div class="divider"></div>
        <p>8 servings per container</p>
        <p class="bold">Serving size <span class="right">2/3 cup (55g)</span></p>
      </header>
      <div class="divider lg"></div>
      <div class="calories-info">
        <p class="bold sm-text">Amount per serving</p>
        <h1>Calories <span class="right">230</span></h1>
      </div>
      <div class="divider md"></div>
      <div class="daily-value sm-text">

<!-- User Editable Region -->

        <p class="right bold no-divider">% Daily Value *</p>
        <div class="divider"></div>
        <p><span class="bold">Total Fat</span> 8g<span class="bold right">10%</span></p>
        <p class="indent no-divider">Saturated Fat 1g <span class="bold right">5%</span></p>
        <div class="divider"></div>
        <p class="indent no-divider"><i>Trans</i> Fat 0g</p>
        <div class="divider"></div>
        <p><span class="bold">Cholesterol</span> 0mg <span class="right bold">0%</span></p>
        <p><span class="bold">Sodium</span> 160mg <span class="right bold">7%</span></p>
        <p><span class="bold">Total Carbohydrate</span> 37g <span class="right bold">13%</span></p>
        <p class="indent no-divider">Dietary Fiber 4g</p>
        <div class="divider"></div>
        <p class="indent no-divider">Total Sugars 12g</p>
        <div class="divider dbl-indent"></div>
       <p class="dbl-indent no-divider">Includes 10g Added Sugars <span class="right bold">20%</span>
      <div class="divider"></div>
      <p class="no-divider"><span class="bold">Protein</span> 3g</p>
      <div class="divider lg"></div>
      <p>Vitamin D 2mcg <span class="right">10%</span></p>
      



      </div>
    </div>
  </body>
</html>

is it possible if we cant talk on facebook pls to help me through this.

Now, correct one name of the classes in the opening tag of the div element before the new p element. The classes names are not “divider lg”, but “divider large”.

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

I just did and still not going through

Post your code here again.

Nutrition Label

Nutrition Facts

8 servings per container

Serving size 2/3 cup (55g)

Amount per serving

Calories 230

    <p class="right bold no-divider">% Daily Value *</p>
    <div class="divider"></div>
    <p><span class="bold">Total Fat</span> 8g<span class="bold right">10%</span></p>
    <p class="indent no-divider">Saturated Fat 1g <span class="bold right">5%</span></p>
    <div class="divider"></div>
    <p class="indent no-divider"><i>Trans</i> Fat 0g</p>
    <div class="divider"></div>
    <p><span class="bold">Cholesterol</span> 0mg <span class="right bold">0%</span></p>
    <p><span class="bold">Sodium</span> 160mg <span class="right bold">7%</span></p>
    <p><span class="bold">Total Carbohydrate</span> 37g <span class="right bold">13%</span></p>
    <p class="indent no-divider">Dietary Fiber 4g</p>
    <div class="divider"></div>
    <p class="indent no-divider">Total Sugars 12g</p>
    <div class="divider dbl-indent"></div>
   <p class="dbl-indent no-divider">Includes 10g Added Sugars <span class="right bold">20%</span>
  <div class="divider"></div>
  <p class="no-divider"><span class="bold">Protein</span> 3g</p>
  <div class="divider large"></div>
  <p>Vitamin D 2mcg <span class="right">10%</span></p>
  



  </div>
</div>

@JeremyLT gave you the exact instruction on how to format code properly. Do it as explained. We can not see the whole code.

This part of your code is OK. It has passed on my side. If you can’t pass the step, something else is not as intended to be.

thus is the first half of my code so far

@juscris11 Do not just paste in part of your HTML. Always paste in all of your HTML. It makes it much easier to test if we don’t have to piece your code together.

If you still cannot pass this step then paste in all of your HTML as you currently have it so we can help you find your errors.

[quote=“juscris11, post:7, topic:614845”]

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Nutrition Label</title>
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,800" rel="stylesheet">
    <link href="./styles.css" rel="stylesheet">
  </head>
  <body>
    <div class="label">
      <header>
        <h1 class="bold">Nutrition Facts</h1>
        <div class="divider"></div>
        <p>8 servings per container</p>
        <p class="bold">Serving size <span class="right">2/3 cup (55g)</span></p>
      </header>
      <div class="divider large"></div>
      <div class="calories-info">
        <p class="bold sm-text">Amount per serving</p>
        <h1>Calories <span class="right">230</span></h1>
      </div>
      <div class="divider md"></div>
      <div class="daily-value sm-text">
<p class="right bold no-divider">% Daily Value *</p>
        <div class="divider"></div>
        <p><span class="bold">Total Fat</span> 8g<span class="bold right">10%</span></p>
        <p class="indent no-divider">Saturated Fat 1g <span class="bold right">5%</span></p>
        <div class="divider"></div>
        <p class="indent no-divider"><i>Trans</i> Fat 0g</p>
        <div class="divider"></div>
        <p><span class="bold">Cholesterol</span> 0mg <span class="right bold">0%</span></p>
        <p><span class="bold">Sodium</span> 160mg <span class="right bold">7%</span></p>
        <p><span class="bold">Total Carbohydrate</span> 37g <span class="right bold">13%</span></p>
        <p class="indent no-divider">Dietary Fiber 4g</p>
        <div class="divider"></div>
        <p class="indent no-divider">Total Sugars 12g</p>
        <div class="divider dbl-indent"></div>
       <p class="dbl-indent no-divider">Includes 10g Added Sugars <span class="right bold">20%</span>
      <div class="divider"></div>
      <p class="no-divider"><span class="bold">Protein</span> 3g</p>
      <div class="divider lg"></div>
      <p>Vitamin D 2mcg <span class="right">10%</span></p>
      



      </div>
    </div>
  </body>
</html>

can help me i’ve been stuck for 2 weeks.

This is correct for the new p element you are adding. When I just paste in this HTML then it passes for me. But when I paste in all of your HTML then it doesn’t pass. So you have obviously changed something else by accident. I’m just too lazy to try and figure out what it is.

Just restart the step to get the original HTML back and then only add the above p element where it should go, being very careful not to change anything else.

P.S. Actually, the span around 10% does not need to have the class right on it. The instructions did not ask you to add that. Usually this extra information would cause the tests to fail, but in this cause it doesn’t appear to do any harm.

when you have the time could you scan through the code for me pls and tell me what I did wrong. I’ve been stuck for two weeks. pls

I’m going to leave that up to you. open up your HTML in one window and the original starting HTML in another and compare it line by line until you find the diff. Or even better, use an online diff checker.

I will say that in general you should not make any extra unexpected changes to the code other than what the instructions ask for. You, and the tests, will be much happier.