Create a Media query stuck

I cannot pass this challenge no matter what I try ?
Am I missing something basic and obvious?

   **Your code so far**

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

 /* Only change code below this line */

 /* 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/90.0.4430.212 Safari/537.36.

Challenge: Create a Media Query

Link to the challenge:

Hi @themancalledpan !

I think it would help to look at the example on how to write a media query because you have some errors.

FCC example:

@media (min-height: 350px) {

 /* CSS Rules */ 


There is a colon here instead of an equal sign.
(min-height: 350px)

and after the media query there are a pair of curly braces.

@media (min-height: 350px){}

You don’t have that here

Once you fix those issue than the test will pass.

Also, you have to make sure that you write your code in the correct place.

The test this time will pass if you don’t write it in there but there will be other tests that won’t be as forgiving.

Hope that helps!

Thank you but still dont get it? It’s saying that this is wrong and is my p tag the entire paragraph? Tried so many options here, I think I am completely lost

@media (min-height: 800px){}
{ /* CSS Rules */ }

I finally got it, Thanks for the help

1 Like

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