[beta] Create a Media Query - Instructions and test don't match
See original GitHub issueChallenge create-a-media-query has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
<style>
@media (max-height: 800px) {
p { font-size: 10px }
}
</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>
In the “Create a Media Query” challenge, the instructions and the test don’t match. The instructions say:
Add a media query, so that the p tag has a font-size of 10px when the device’s height is smaller than 800px.
Smaller than 800px means 799 or less, so the correct media query should be “max-width: 799px”. The test actually passes with “max-width: 800px”, which translates into English as 800px or smaller.
Basically, the instructions call for width < 800, but the test checks for width <= 800. Either one is fine, but they need to match each other.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
I figure out why it wasn’t working for me, hope it can be of help to someone else too. I wasn’t including the “p tag” in the curly brackets under the media query.
`<style> p { font-size: 20px; }
/* Add media query below */ @media (max-height: 800px) {p {font-size: 10px;}}
</style>`
only because this is the first result for googling this error - check the forum post - https://www.freecodecamp.org/forum/t/create-a-media-query/185828 basically you need to make sure in Chrome’s settings that the font sizes are 10px minimum (otherwise this just doesn’t pass ever)