Tribute Page image display and dimensions

Hello,

So I’m trying to get my image to pass these 3 tests,

  • Failed: Your img element should have a display of block.
  • Failed: Your #image should have a max-width of 100%.

  • Failed: Your #image should be centered within its parent.

This is the code for my figure and image elements

and my CSS selectors for the image:

img {
    display: block;
}

#image {
    max-width: 100%;
    height: auto;
    margin:auto;
}

I have no idea why these tests are failing. Any help would be appreciated.

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 it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

HI @bmcbride22 !

Welcome to the forum!

You don’t need to create two different selectors here
Since you are only using one image, you can add all of the styles to one selector targeting the image.

Make sure you properly linked your css to the HTML document.
Reread through the directions for the project on how to do that if you haven’t .

If you still need help, please post your full code in the forum.

Hope that helps!