Create a Media Query "p" element

Here is Your solution, try this

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

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.

4 Likes

Hm, that is strange, may be a glich.

If you copy-pasted the code from ā€œsolutionā€ and it is not working, something else must be a problem.

Things to check: is your browser updated, are there any running extensions?
Dark mode can interfere, for example.

Hi,
I was stuck exactly as you! There is certainly a glitch, because I tried more times, with the solution code and it didnā€™t work. But after resetting the code 2 or 3 times it worked!
Weirdā€¦
code used:
@media (max-height: 800px) {
p{
font-size: 10px;
}
}

p {

    font-size: 20px;

  }

  /* Only change code below this line */

 @media(max-height: 800px){

  p {

    font-size: 10px;

  }

}

yes your missing two backets to your @media

Hi @mc2cavalier04 !

Welcome to the forum!

This post has already been marked as solved.
But also, we donā€™t encourage people to hand out solutions.
It is better to provide hints to the OP with their problem.

I already got the answer right so doing this didnā€™t work for meā€¦I had to come out of the question and sign in again on a different browser(Edge) for it to work for me. Then go back to using firefox on the next lesson.

same problem, I can"t pass this challengeā€¦ : (

I had same problem, For me this problem was due to Ad-blocker, After disabling it, I was able to Run all the tests successfully.

1 Like

@i.m.programming, if youā€™re having an issueā€¦

If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Ok, Iā€™ll do it,
thank you too.

I did it, but when i click on the button ā€œCreate a help post on the forumā€
it doesnā€™t do anythingā€¦

Can you expand on ā€œdoesnā€™t do anything?ā€

Which browser are you using? Have you tried a different one?
Sometimes clearing cache helps.

doesnā€™t do anything, means that the pop up window closes, but it don"t create any help post on the forum.
iā€™m using Google Chrome, Version 67.0.3396.87 (Official Build) (64-bit).

I tried from another computer(newer) with google chrome but the latest version( version 91.0.4472.114 (official build)(64-bit).
and it works.
thank you for your suggestion!

@i.m.programming, yeah, that was an old version.
Good to hear you got it to work.

Thank you! This worked for me

/* I too tried numerous times on chrome and finally got it.
Please find the solution, It may be helpful: @ isabellacroydon*/

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

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

Media query

Hi @sat1sh !

Welcome to the forum!

This post has already been marked as solved.
Also, I have added spoiler tags around your code.