Why does the 1 Test not work? Tribute Page

It is my first project and the test number 9 " 1. The element should responsively resize, relative to the width of its parent element, without exceeding its original size." is not working. How can I fix that? code pen

I can’t open your pen right now (maybe issues on codepen side?), but if you look below the failed test, there is an error message that usually says something useful

I don’t get it even with the information, I can open the link idk

what’s written below the failed test?

image

you still have errors on the page.

Hey @digituar, The test said that you need to make your image responsive. It also kind of hinted to what to do.

try it like this:

#image {
    max-width: 100%;
    display: block; 
    height: auto;
    margin: auto;
}
3 Likes

@Camoflasche
Hi Mate,
when you click the red “tests 9/10” button, then read the error, the first line of the code below will give you a clue what the issue is;

"Use the “display” style property with a value of “block” for responsive images.: expected ‘inline’ to equal ‘block’"

so @digituar has fixed it for you with the post above :slightly_smiling_face:

2 Likes

thanks, the auto margin was it :slight_smile:

1 Like