Responsive Web Design Principles - Create a Media Query

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

  **Your code so far**
<style>
p{ @media (min-width :800px; font-size:20px)

/* Only change code below this line */

/* Only change code above this line */
</style>

<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 11; TECNO PR651H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.58 Mobile Safari/537.36

Challenge: Responsive Web Design Principles - Create a Media Query

Link to the challenge:

Hello, we see some code you posted, but no question…

what’s your question?

Add a media query, so that the p tag has a font-size of 10px when the device’s height is less than or equal to 800px .

@media only screen and (max-width:800px) {
}

I think you can continue from there…

No oh. Still don’t get it

please try to ask a question. Asking a question in itself will make you see what you missed sometimes. (Try to describe what you are trying to do, what the hints have said, and how you are interpreting this)

1 Like

I was asked to do this
Add a media query, so that the p tag has a font-size of 10px when the device’s height is less than or equal to 800px .

And I have attempted all I could, yet couldn’t get it

okay, so you need a media query.
The exercise tells how to write them:

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

So I would run “Restart Step” button and add that in to my code.
Then I would replace the /* CSS Rules */ bit with some code as per the exercise.

the p tag has a font-size of 10px

And I would fix the part about min-height based on the info they provided which was:

the device’s height is less than or equal to 800px.

Or you can start from the end of this as well and do the 800px requirement first.
If you click Check each time you change something a Hint will be shown to help you along.

Try again and hopefully you can make further progress.

Ouch. Still rejecting

what do you have so far? (code-wise)

P{font-size: 20px;
@media{min-height:800px}

Try switching this so the p selector is inside the media block.

Why do you think that it should be outside?

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