Learn Typography by Building a Nutrition Label - Step 26: Got stuck - help would be greatly appreciated

Hi, everyone

Hope this msg will find y’all well.

So here it is: I’ve got stuck in this step. I’ve already reviewed my code many times and can’t find out what am I doing wrong.

I’m really not finding the mistake in my code, regardless of my efforts reviewing it.

If someone could take a glance on it and tell me where’s the error I’d be incredibly thankful

Many thanks in advance and happy coding.

Sweet!

Your code so far

/* file: index.Ext.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>
     </div>
    </header>
   </div>
  <div class="divider large"></div>
</body>
</html>
/* file: styles.Ext.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;
}

Your mobile information:

SM-G935V - Android 8.0.0 - Android SDK 26

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

Link to the challenge:

You have added an extra closing div in your code.

The div above the header. The class label div is already closing after the header closing tag.

1 Like

Hi Buddy !!

Well tried,

As @stephenmutheu Sir advised you just need to remove the extra div

  <div></div>

See this how we put the div element !!

Hope you understand !!

Hey, y’all!

I don’t have words to express my gratitude!

Got it! Now the code passed!

Let’s keep moving forward and happy coding!

Sweet!

:slight_smile: