My code doesn't run

Tell us what’s happening:

code doesn’t run. I don’t know what wrong with it?

Your code so far


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

/* Only change code below this line */

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


<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; rv:80.0) Gecko/20100101 Firefox/80.0.

Challenge: Create a Media Query

Link to the challenge:

Hi @robotmeaw. Welcome to FCC. Your code is not passing because:

  1. The media query is not inside style tag
  2. You have added height property to p element. Remove it.
2 Likes

Thanks so much. It’s helpful!