Learn Typography by Building a Nutrition Label - Step 43

Tell us what’s happening:

Please help I can’t figure this out, I’m sure this is correct. I searched online and this seems to be right.

Step 43

After your last .divider element, create a p element and give it the text Total Fat 8g 10%. Wrap the text Total Fat in a span element with the class of bold. Wrap the text 10% in another span element with the class of bold. Finally, nest the Total Fat span element and the text 8g in an additional span element for alignment.

Your code so far

  <div class="divider">
    <p><span><span class="bold">Total Fat</span> 8g</span> <span class="bold">10%</span></p>
    </div>

Welcome to the forum @Teee

You nested your code in the div element, not below it.

Place the new code below this element.

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

Happy coding

Hi i changed that but its still not working

Use the following method to post your full code to the forum:

  1. On a separate line type three back ticks.
  2. On a separate line paste your code.
  3. On the last line type three back ticks. Here is a single back tick `

Happy coding

like this

<div class="divider"></div>
        <p><span><span class="bold">Total Fat</span> 8g</span> <span class="bold">10%</span></p>

All of the code please, copy and then paste everything from the editor.

here you go

<!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>2/3 cup (55g)</span></p>
    </header>
    <div class="divider large"></div>
    <div class="calories-info">
      <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">% Daily Value *</p></div>
      <div class="divider"></div>
        <p><span><span class="bold">Total Fat</span> 8g</span> <span class="bold">10%</span></p>

Remove the closing div tag at the end of this paragraph element.

Then at the end of your code add:

  1. two closing div tags
  2. one closing body tag
  3. one closing html tag
1 Like

Omg that worked thank you so much I was going crazy there tbh. can’t wait till I’m a pro and can figure these things out on my own.

Again thanks a million :smiley:

2 Likes

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