Media queries giving me a problem

Tell us what’s happening: Guys may you kindly please help me out with this challenge, I honestly cannot see where I am wrong.

Your code so far


<style>
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>

<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/86.0.4240.111 Safari/537.36 Edg/86.0.622.51.

Challenge: Create a Media Query

Link to the challenge:

1 Like

Hey @Simphiwe1. There is a little bit of typo here:

Happy Non-Stuck Coding!

Doesn’t work unfortunately :cry:

1 Like

But, it works for me!
Can you share your code???

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

1 Like

There is no closing ‘}’ for the media query!

you are forgetting to close the brackets see there are two opening brackets { but only one closing bracket {

@media (max-height: 800px) { <---1st opening bracket 
p {<---2nd opening bracket
font-size: 10px;
}<--1st closing bracket

I am so sorry for wasting your time but I’ve tried all of this but it does not work :man_facepalming:

1 Like

Please share your current full code. When posting code, please do as follows:

@media (max-height: 800px) {`Preformatted text`
p {
font-size: 10px;
}`Preformatted text`
1 Like

You did not add the closing } I said!

May you please just right exactly what I need to write on my code.

1 Like
@media (max-height: 800px) {
p {
font-size: 10px;
}
}
1 Like
@media (max-height: 800px) {
p {
font-size: 10px;
}
}  <-- this is what you want

If you look at the code, you can see that the line that had the media query declaration does have an opening {, but no closing }.

1 Like

You are the best :smile:

You a code saver :smile:

1 Like