So the failing message says; The <img> element should responsively resize, relative to the width of its parent element, without exceeding its original size. Try using the "max-width" style property : expected 'none' to not equal 'none'
You have width: 100%
When you correct that and run the tests it will fail in the same place with a different error message; The <img> element should responsively resize, relative to the width of its parent element, without exceeding its original size. Use the "display" style property with a value of "block" for responsive images.: expected 'inline' to equal 'block'
When you correct that it will fail in the same place with yet another error message; The <img> element should be centered within its parent element. Image is not centered: expected 9 to be close to 524 +/- 11
You have margin: 2px That won’t center. Maybe something like margin: auto would help center, right?
Clicking the red button to see the failing test(s) and reading the error message is crucial to resolving issues.
thanks for your quick reply,
yes i did before to change the max-width after reading error.
i edited on my notepad++ triee it on my browser.
i tried display: inline;
maybe because im understanding wrong about that block expected.
and thanks for your solution. now i got that error read better understanding.
hi @djtriniboya90
welcome to the forum.
im sorry to interups, i know you were asking for the moderator Roma to reply .
but i just want to short brief to the codes that you wrote.
first, i believe there is no value of center for display property in css inside your #main id selector.
second, the properties inside your #image id selector shouldn’t have property of width : 0; as it would not showing any image. the three code lines that roma mentioned to have all in to pass the img test is this :
#image {
display: block; /* default value for img element is inline-block */
max-width: 100%; /* to make sure it fits in the image container, the #img-div container on your code */
margin: auto; /* to centering image as block level element inside the container, the #img-div container */
}
third, in your html, img element is self-closing tag, there is no need to use </img> . and beside that you forgot to close the img tag. in short it should be like this :