Media Query Challenge

Media Query Challenge
0

#1

Hi Randell. Im a beginner in coding. May l ask you for help?
Heres my code below but won’t pass. Im using a '09 Macbook Pro. Any ideas please ?

Also, how could l make this email reachout to the entire FreeCodeCamp forum, instead of one specific person ?
Thx
Nick

 p {
    font-size: 20px;
  }
  
  /* Add media query below */

  @media (max-height: 800px) {
  p { 
    font-size: 10px; 
    }
    }

#2

#3

In the future, you can just click on the Ask for Help button located on the challenge, which will put your code and the url for the challenge into a post for you. Then, you will just ask your question there.

I am not sure which challenge you are working on with the code you posted here. Can you reply back with the url of the challenge?


#4

Hope this is what you need. Thanks Randell.

https://learn.freecodecamp.org/responsive-web-design/responsive-web-design-principles/create-a-media-query


#5

You need to copy the code (Ctrl+c on windows) and then paste the code (Ctrl+v on windows) into the reply. We can not see your code on the curriculum site. Only you can see that.


#6

Windows. Ok. Im using a Mac.

Heres my code:

<style>
  p {
    font-size: 20px;
  }
  
  /* Add media query below */

  @media (max-height: 800px) {
  p { 
    font-size: 10px; 
    }
    }
</style>
  
<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>

Heres the instructions:
Add a media query, so that the p tag has a font-size of 10px when the device’s height is less than or equal to 800px.


#7

Your code looks fine. Not sure what browser you are using with the curriculum, but Chrome works the best. It has features that some browsers like Safari do not have yet, which could be the problem.


#8

Ok. Yes. Im using Safari with my Mac.

Then l’ll try Chrome with the curriculum. May I ask how to download it and place in my side App bar ? That way l can just click to use Chrome for the curriculum.


#9

I am not a Mac user, so I do not know.


#10

Ok Randell. Thank you for your help. Much appreciate !


#11

“Chrome” did the trick. Thanks again.