Tell us what’s happening:
are my code wrong?
can you tell me how to solve this?
" Your p element should have an initial font-size of 20px when the device height is more than 800px."
Your code so far
<style>
@media (max-height: 800px){
p {
font-size: 10px;
}
}
/* Only change code below this line */
@media (min-width: 800px){
p {
initial-font-size: 20px;
}}
/* 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 6.1; rv:78.0) Gecko/20100101 Firefox/78.0.
It appears you have changed a part of the code that you are not supposed to change.
In any case, you are required to " 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."
You should therefore define a media query for when the maximum height is 800px, ie:
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.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.