Media Query issue-please help

Tell us what’s happening:
Describe your issue in detail here.
I still have 2 points to do:

You should declare a @media query for devices with a height less than or equal to 800px .

Your p element should have a font-size of 10px when the device height is less than or equal to 800px .

  **Your code so far**

p {
  font-size: 20px;

/* Only change code below this line */
@media (max-height: 800px)
/* 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/97.0.4692.99 Safari/537.36

Challenge: Create a Media Query

Link to the challenge:

Hi @Larisa97 ,

You have specified the condition for the media query but haven’t written code for the font-size of p tag to be 10px for the same.

@media (max-height: 800px){
/* write your code for font-size here */

1 Like

I did. Still not working

What is your code right now?

@media (max-height: 800px)

p {font-size: 10px;


You forgot a bracket in opening your media query function

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


It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

You can post solutions that invite discussion (like asking how the solution works, or asking about certain parts of the solution). But please don’t just post your solution for the sake of sharing it.
If you post a full passing solution to a challenge and have questions about it, please surround it with [spoiler] and [/spoiler] tags on the line above and below your solution code.

I understand the point, I changed my message and added the spoiler tags. After, I didn’t create the solution, I used the one gave by the topic author just before my message. In all the case, sorry for the inconvenience.

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