How can I create a media query

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

p {
  font-size: 20px;

/* Only change code below this line */
@media (min-height: 800px){
p {
  font-size: 10px;
/* 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 (Linux; Android 8.1.0; TECNO BB2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Mobile Safari/537.36

Challenge: Create a Media Query

Link to the challenge:

So where are you stuck?

I have added the media query and it’s not really coming. Am confused can you please help me explain how the media query works please. Thanks

Well you are trying to do a media query on the height vs the min-width or max-width. Your query should be on something that you know will change. The height can be infinite and still work well on a cell phone but you may want the size of your typeface to change if the screen is too narrow.

1 Like

Ok I get it now thanks. But is my syntax for adding media query correct?

Yes, the syntax does seem correct.

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