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

Tell us what’s happening:
Can someone please tell me why i couldn’t pass the second task " Your p element should have a font-size of 10px when the device height is less than or equal to 800px". This seems very confusing to me. With my code so far I managed to complete the first and last tasks.

Thank you so much!

Your code so far


<style>
p {
  font-size: 20px;
}

/* Only change code below this line */
@media (max-height: 800px) { /* CSS Rules */ }
p {
font-size: 10px;
}
/* Only change code above this line */
</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 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36.

Challenge: Create a Media Query

Link to the challenge:
https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-principles/create-a-media-query

@stellayuss
This is your code:

It should be written this way ,a small mistake no worries.

Thank you so much for this! IT WORKED! Hooray!

1 Like