I keep receiving this message " Your p element should have a font-size of 10px when the device height is less than or equal to 800px"
Can anyone help me out please?
**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 p element should have a font-size of 10px when the device height is less than or equal to 800px.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36.
I looked at your code and tested it at the very start.
Check again the link I have provided.
Count the number of brackets.
There are 6 brackets in the complete example.
You have only 4 brackets in your code.
You are missing one pair of curly ones.
But the one im getting wrong is the “p” tag/element. Thats the question i cant pass. I’ve changed it and added more curly brackets but it says what im doing with the media bit is correct its the ‘p’ tag that wont let me pass.
Its supposed to be height not width but I’ve done this exact code using both width and height but still doesnt seem to pass me. Cant figure it out unless its a glitch? But i doubt they would be a glitch.
Sorry. Didn’t spot the height. Should work though if you’re surrounding your selectors inside the media query with curly braces. Sorry I can’t help more.
Can you show me the code you would use to pass this and i will take a screen shot of your code to see if it passes on my laptop? Because I honestly cant see what im getting wrong, feel like ive tried everything!
Read this. They where having the same problem as me so im guessing it must be a glitch? Cant get my head around it. Ive moved on and passed the other modules but cant get this one to pass.
In your screen shot, as far as I can see, you only need to move the closing curly brace that comes after your CSS rules comment to after the closing brace of the p selector. Just before the closing style tag.