Is there a Glitch in this challenge?

Hi there,

I am inputting the correct coding for this challenge but it doesn’t seem to be accepting my height code. Below is my code so far. Let me know if I am doing something wrong. Thanks!


<style>
h4 {
  text-align: center;
  height: 25px;
}
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>Google</h4>
    <p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.</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>

What do the failing tests say?

What is the url of the challenge and what browser are you using?


// running tests Your code should change the

h4


height


property to a value of 25 pixels. // tests completed


https://www.freecodecamp.org/learn/responsive-web-design/applied-visual-design/adjust-the-height-of-an-element-using-the-height-property

What browser are you using?

I am using Google chrome!

Also, can you open your browser’s console and type $('h4').css('height') and press enter and then show me a screenshot of what you see?

Which tests are failing?

After I opened my browser console I realized that google chrome was the problem. It worked in Safari, and so I’ll continue to use it in Safari.03%20PM

@lasjorg Any thoughts on why this may be failing?

possibly a pop up blocker? I’m relatively new to the coding world.

Here we are again.


I have updated Chrome, cleared cache, refreshed, still stuck (next lesson on height same problem).
Trying Firefox now.

Let’s try something again. While your browser’s console is open, click on the icon which allows you to select an element for inspection. Then click back into the console and enter:

var elem = document.querySelector('h4');
window.getComputedStyle(elem).height;

and then click enter to see what you get.

The icon is circled in red below:
image

The error does not occur in Firefox. Just read somewhere up this thread that the error also does not occur in Safari. But I would like to troubleshoot this in Chrome, as it’s the browser I use most (for better or worse), so I would like to try to follow your lead here, stand by

this is the result, highlighted in red:

 VM7133:2 Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
    at <anonymous>:2:8 

i can see this was clipped.

VM7133:2 Uncaught TypeError: Failed to execute ‘getComputedStyle’ on ‘Window’: parameter 1 is not of type ‘Element’.
at :2:8

@markthomastheolder This means you have not selected the h4 element using the element selector icon I mentioned above. Click the icon so that it turns blue and then select the h4 element which has Google in it and then click the console to enter the code I reference above.

I see. Thanks for the restatement. Stand by

OK, definitely selected the <.h4>Google<./h4> element (which was followed by ==0$).

The result after entering the snippet you pasted in at the start was

“18px”

I should be clear, I am inside of (the console for) the width lesson. This is a thread about the height lesson. But I was finding the same run-tests error in both. Let me know if I need to get out and look at the console inside the height lesson.