#Layout 1. The <img> element should responsively resize, relative to the width of its parent element, without exceeding its original size

Hi, there appears to be one step left,
the test error tells me to add block to display. when I do this, it moves my image from center which it asked me to do.

Can anyone help clarify the error please?

https://codepen.io/coded-carbon/pen/abpMrEO

try setting a definite height

1 Like

Add display: block; (it will be a block element)
If you’ve done that the image would be positioned on the left side of the screen (ignoring text-align: center;)
To fix this you need to add margin: auto; to .responsive-img element.

1 Like

Hi McallumW,

thank you for responding, I did try what you suggested but it needed a little more.

Your suggestion worked Maz, thank you so much, it wasn’t logical to me yet that I had to put something in to correct a command knocking the alignment out of place. It has been a great learning experience finding the solution. :pray: :raised_hands: :writing_hand:

1 Like

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