Build a Tribute Page (User Story 8#)

Hi, this is my first time posting so sorry if I do anything wrong. I am having issues completing the 8th user story task of the tribute page task, here is the link:

I have looked for solutions in other posts and nothing has worked so far. can anyone help? (thanks in advance)

@ray.esin1, when a test fails click the red button to see which test(s) are failing and text to help you correct the issue.
Be sure and read more than just the first line of the failing message. The ability to read and comprehend error messages is a skill you’ll need to acquire as a developer. Ask questions on what you don’t understand.

The full failing test 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'
AssertionError: Try using the "max-width" style property : expected 'none' to not equal 'none'

Do you understand what the test is looking for and why it is failing?

EDIT:
On closer inspection of your code the reason the test is failing is because you do not quite meet this user story
Within the img-div element, I should see an img element with a corresponding id="image"

Do you see that id="image" is not an attribute of the img element but instead it is of a div element. When corrected the tests pass successfully.

1 Like

Hi Ray, I can see you have used the correct max width and height and your image is responsive you so are probably very confused by the error message your seeing.

user story #4 says to give your img an id of “image” which your HTML shows but if you look closely at your CSS where you have used your width and height, the name of the element is just img … if you change this to show you are styling the div id instead of just the img inside of it then it will pass

1 Like

thank you so much! after reading your comment I realized including the image inside a div element with the image attribute wasn’t the same as assigning the attribute directly to the image.

thank you as well, I also found your comment helped clear things up for me!