Tribute Page Problem: responsively resize img relative to parent element

Trying to pass the first test in the 9th criteria for the first project in the rwd curriculum. Not sure what I’m doing wrong and I’ve spent an hour now trying to find what the issue is. Thank you for your time!
Link to my code: https://codepen.io/garrettfiorito/pen/PobRWgB

Hi, welcome to FCC. I see that you assigned the max-width to 100% of your #img-div. But it only applies to your #img-div.

The image
<img id='image' src=''>
itself doesn’t automatically resize to the parent div.

So you have to add the CSS for your #image.

Some tips:

  • You can move all your <style> {css here} </style> to the CSS bar in codepen without the style tag.

  • You can specify multiple id/class/tag in your CSS code e.g:

#img-div, #image {
   color: red
}

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.