HI,
I am on challenge “Responsive Web Design Principles: Create a Media Query”. I input my code and it keeps telling me I have it wrong. The message I am getting is:
// running tests
Your p element should have the font-size of 10px when the device height is less than or equal to 800px.
// tests completed
I have run my code several times and checked it against the hint but I keep getting that message. I don’t know what to do. My code is:
/* Add media query below */
@media (max-height: 800px){
p {
font-size: 10px;
}
}
Please format your code using backticks, you can select the code you are pasting in the post editor and use the </> button to format it so that it is correctly visible
I’ve edited your post for readability. 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 easier to read.
See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.
I think I understand what you’re trying to do. What @ILM says is correct, there isn’t an image tag in your code. You say earlier that you copied and pasted from the hint & the video, but you didn’t actually do that, not accurately.
I think, and correct me if I’m wrong, that you’ve tried to do this:
This is not correct, it’s won’t work, and if you look at examples, it does not match them at all.
The CSS style goes in the <style> block. In that style block you select which element you want to style and apply styles to it. In this case, it is an HTML <img /> tag.
So you should have
<style>
img {
/* Some styles here */
}
</style>
<img src="https://wbdirifjf.com/eorirj.jpg />
HTML elements have attributes (like src and alt) which can take a value. They look like name="value". This: