Failed test case

Tell us what’s happening:
It was given that i had to apply padding of 1.5 em on the “red-box” class but after doing so the test cases are failing. I even went through the video solution which did the same thing.

Your code so far


<style>
.injected-text {
  margin-bottom: -25px;
  text-align: center;
}

.box {
  border-style: solid;
  border-color: black;
  border-width: 5px;
  text-align: center;
}

.yellow-box {
  background-color: yellow;
  padding: 20px 40px 20px 40px;
}

.red-box {
  background-color: red;
  margin: 20px 40px 20px 40px;
  padding : 1.5em ;

}

.green-box {
  background-color: green;
  margin: 20px 40px 20px 40px;
}
</style>
<h5 class="injected-text">margin</h5>

<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box green-box">padding</h5>
</div>

Your browser information:

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

Challenge: Understand Absolute versus Relative Units

Link to the challenge:

1 Like

You have an unnecessary space after the padding element, remove it and you’re doing fine.

2 Likes

Thank you so muchh!!

1 Like

This kind of problem will be ongoing. In order to scale
the debugging solution you need to automate your syntax
checking with a linter. For example the solutions noted
below could be found with https://stylelint.io/ which has
a demo page that finds all the errors in your css above,
not just the one error that fixed this problem for the
freecodecamp test case.

2 Likes