Media Query on course not working

On the codecamp course about htm and css the @media is not working even though i think i’m doing everything right, i’ve tried reset all the code and doing it again.

   ![Captura de ecrã 2021-11-16 143404|670x301](upload://bjQnbJGtfkiDrHu5VGqs4NsA2q4.png)

 p {
   font-size: 20px;

 /* Only change code below this line */
@media (max-height: 800px){ 
   p {
   font-size: 10px;
 /* Only change code above this line */

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus quis tempus massa. Aenean erat nisl, gravida vel vestibulum cursus, interdum sit amet lectus. Sed sit amet quam nibh. Suspendisse quis tincidunt nulla. In hac habitasse platea dictumst. Ut sit amet pretium nisl. Vivamus vel mi sem. Aenean sit amet consectetur sem. Suspendisse pretium, purus et gravida consequat, nunc ligula ultricies diam, at aliquet velit libero a dui.</p>
   **Your browser information:**

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

Challenge: Create a Media Query

Link to the challenge:

You can’t leave whitespace between your @media and the condition (max-height: 800px)

1 Like

It’s still not working

strange. I’ve just copy pasted your original code and it works fine on my end whitespace and all. Have you tried resetting the code?

Yes, I’ve tried everything, I’ve seen someone with the same problem so it must be an error in the course. I appreciate your help tho!

Yes and your working in Portuguese right?
ajudei alguem ontem que tinha exatamente o mesmo problema

sim :smiley:
só vi uma pessoa até agora com o mesmo problema, é estranho mas deve ser um erro do curso mesmo

Tenta mudar a lingua para ingles. reiniciar a pagina e fazer novamente

fiz isso também, na verdade estou a fazer o curso todo em inglês

The code you have shared works on my end. Please ensure that you have disabled any extensions that interface with the freeCodeCamp website (such as Dark Mode and Ad Blocker), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

1 Like

Thank you! I’m guessing it was the ad block that was getting in the way. Everything works perfectly now.

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