Why can't I pass this font-size task?

Tell us what’s happening:

This seems like a very straightforward challenge, or so I thought. I’ve added a ‘font-size’ property to the h4 style and set it to ‘27px’. The preview updated appropriately. Thanks!

  **Your code so far**

<style>
h4 {
  text-align: center;
  background-color: rgba(45, 45, 45, 0.1);
  padding: 10px;
  font-size: 27px;
}
p {
  text-align: justify;
}
.links {
  text-align: left;
  color: black;
}
.fullCard {
  width: 245px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin: 10px 5px;
  padding: 4px;
}
.cardContent {
  padding: 10px;
}
.cardText {
  margin-bottom: 30px;
}
</style>
<div class="fullCard">
<div class="cardContent">
  <div class="cardText">
    <h4>Alphabet</h4>
    <hr>
    <p><em>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</em></p>
  </div>
  <div class="cardLinks">
    <a href="https://en.wikipedia.org/wiki/Larry_Page" target="_blank" class="links">Larry Page</a><br><br>
    <a href="https://en.wikipedia.org/wiki/Sergey_Brin" target="_blank" class="links">Sergey Brin</a>
  </div>
</div>
</div>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0

Challenge: Adjust the Size of a Header Versus a Paragraph Tag

Link to the challenge:

I switched to Chrome and my existing code passed just fine. I guess there is a bug that affects Firefox?

Different browsers have different peculiarities.

That being said, your code passes for me on my macbook using FF.

Do you have dark mode on? I would only expect that to affect color based tests, but who knows.

That being aid, sometimes browsers just “glitch” and a test starts failing. The traditional advice is reboot, clear the browser cache, or try a different browser. If none of that works, just back out and move onto the next lesson.

1 Like

Yeah, dark mode. I’ll be sure to check that in the future. Thank you.

Because this extension modifies the CSS of websites, it is likely to cause several CSS tests to fail. You should be able to set your browser extension to leave freeCodeCamp.org unchanged. Both the curriculum and the forum have built-in dark modes that you can use.

1 Like

I was referring to the built-in dark mode.

That won’t effect the CSS tests.

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