RWD: Create a Media Query lesson

RWD: Create a Media Query lesson
0

#1

Tell us what’s happening:
I keep getting an error/wrong answer with this current code. The goal is to " 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."
The media query is correct, and the p font-size is set to 10px. So why is it not correct?

Your code so far


<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>

Your browser information:

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


#2

Are you by any chance using Edge, IE, or Safari as your browser? Free Code Camp has been updated to use newer technologies. It makes the application much faster and it means that we can go much longer without having to do a huge migration like the recent one. However, Edge, Internet Explorer, and Safari are very bad about choosing not to adhere to standards and support new functionality in JS and CSS. Right now, that means that these browsers exhibit lots of unexpected behavior. If you become a web developer you will come to hate these browsers with every fiber of your being.


#3

Thanks for the hint, but I am on Chrome, and the latest version. I tried it in other versions as well, as that was also my first thought.

So this just seems to be a weird bug?


#4

The code that you included above does pass when I try running it. Maybe try resetting the challenge and putting your solution in again.


#5

Thanks for your help. I’ve tried resetting it a couple times, cleared my browser history and all cookies and such, and tried again. Still keeps giving me “wrong answer” response.
I’ve now got the same thing happening further on in the course for a JavaScript lesson! I guess I’m just real good at finding the wonky bugs.


#6

Wonky is fine, but unreproducable is a problem because if it can’t be reproduced it can’t really be fixed. I’m assuming that you’ve asked about the JavaScript lesson you’re having problems with? Are people saying that your exact code works on their browsers there too?


#7

That one seems to have resolved itself after I cleared cookies.
I’ll forget this for now, maybe I’ll try to fix it when I can’t stand to not have that circle checked any longer.
Thanks for trying