I am supposed to maintain the font size of element p to 10px when width of device is less than or equal to 800px. Can someone point out the error?

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 (max-width: 800px) {
	  p {
		font-size: 20px;
/* 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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Safari/605.1.15

Challenge: Create a Media Query

Link to the challenge:

Hey @martinian.rizvi12 the challange is to set the font size for screen height less or equal to 800px.

You have used max-width instead of max-height. :slightly_smiling_face: :wink:

1 Like

Hi @martinian.rizvi12 !

You also need to use a font-size of 10px here

that worked. obviously! Thanks :grinning_face_with_smiling_eyes:

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