Learn Typography by Building a Nutrition Label - Step 33

Tell us what’s happening:
Its driving me crazy. the instructions state " Below your .small-text element, create a new p element with the text Calories . Also below the .left-container element, create a new span element with the text 230 ."

I do EXACTLY as the instructions say and I get this error. There is nothing in the instructions that state I have to put a p element within the .calories-into element. WTH?

Test

Sorry, your code does not pass. Hang in there.

Hint

You should have a new p element within your .calories-info 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>2/3 cup (55g)</span></p>
    </header>
    <div class="divider large"></div>

<!-- User Editable Region -->

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

<!-- User Editable Region -->

  </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;
  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;
}

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

.calories-info h2 {
  margin: 0;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

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

Link to the challenge:

3 Likes

i think you deleted the element that was there before (the .calories-info element).
I suggest you reset and force the browser to refresh the code using the CTRL-F5 keys and then redo the step. This time only add a p element and a span element (nothing else).

3 Likes

The element is not below the .left-container element but within it. Place span after the closing tag of the

2 Likes

HI! I’m facing the exact same issue. Have you found the solution? Please let me know… :')

3 Likes

I’ve done EVERYTHING short of pulling my hair out and it’s not working. I do EXACTLY what is instructed. Then I get instructions that it’s wrong and should be in another place. I put the coding where it’s telling me to move it, then again it’s telling me its wrong. I have hit CTRL-F5 100,000,000 times and its still telling me its wrong. At this point I think its the coding of the website.

3 Likes

If you have a question about a specific challenge as it relates to your written code for that challenge, and you’ve tried to solve it at least 3 times so far and still need some help, just click the Ask for Help button located on the challenge (it looks like a question mark).
This button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

2 Likes

Please post the new code (from top to bottom) in your reply so I can help you further.

2 Likes

I have done that already. If you look ABOVE ^ you will see that I am OP of the post.

1 Like

hi there, I was responding to a different user. I understand you are getting notified but that is just the design of the forum.

1 Like

Tell us what’s happening:
Describe your issue in detail here.

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>2/3 cup (55g)</span></p>
    </header>
    <div class="divider large"></div>

<!-- User Editable Region -->

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

<!-- User Editable Region -->

  </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;
  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;
}

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

.calories-info h2 {
  margin: 0;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

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

Link to the challenge:

1 Like

I still get this error.

Test

Sorry, your code does not pass. Hang in there.

Hint

Your p element should have the text Calories.

3 Likes

You moved the h2 element, so the tests cannot find it or your p element.

1 Like

hello again, please open a new topic only if you have a question about a different challenge in future. I’ve merged the duplicate topic to the original one.

2 Likes

IT still throws that error.

2 Likes

What did you change in order to fix that error?

2 Likes
 <div class="left-container">
        <h2 class="bold small-text">Amount per serving</h2>
        <p>Calories</p>
        <div class="calories-info"><span>230</span></div>
      </div>
    </div>

Test

Sorry, your code does not pass. Try again.

Hint

You should have a new p element within your .calories-info element.

1 Like

Where is the extra closing div tag coming from?

This is the starting code:

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

You should only add the new p and new span. Nothing else should be added or moved.

When I copy-paste your new p and new span into the original code, then it passes for me.

1 Like

put the span230span under the first closing div

11 Likes

I give up. I am doing what you guys are saying. It still throws the damn error! I am so frustrated at this point.

1 Like

reloag the page and try this code


mod edit: code removed
1 Like