Please havig problem regarding learn responsive web design

Tell us what’s happening:
your p element should have a font-size of 10 px
when the device is height is less than or equal to 800px
Your code so far


<style>
p {
  font-size: 20px;
}

/* Only change code below this line */
@media (max-height:800px)
p{
font-height: 10px
}
/* 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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763.

Challenge: Create a Media Query

Link to the challenge:

you have written

that’s not font-size, also you need to end the line with a semicolon ;

I am having exactly the same problem. I have entered the core correctly, as far as I can seen, watched the video and checked the hints- still to no avail.

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.

i change the code already to
“font-size :10px” but i could not pass the test

do you have a semicolon at the end of the line?

please post your new code

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

Please use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks are not single quotes.

markdown_Forums

type or paste code heretyle>
  p {
    font-size: 20px;
  }

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

Seeing two problems here.

First problem may be a mistake within your reply itself, though, rather than your code itself:

type or paste code heretyle>

Second, you have a slight error in your media query–specifically, you’re missing a set of curly braces. Your media query should look like this:

@media (max-height: 800px){
/* whatever you want to change should be nested here, with its own set of curly braces */
}

So if I wanted to change my link colour to red when max-height was set to 800px, it would look like this:

@media (max-height: 800px){
   a {
     color: red;
    }
}

Make sense?

1 Like

Thank you
Your reply was helpful