Tried lots of things on this and cannot get the last test to pass My image on the tribute page is nice and responsive as far as I’m aware but I keep getting the error:
The element should responsively resize, relative to the width of its parent element, without exceeding its original size.
Below that line it suggests "_ Use the “display” style property with a value of “block” forresponsive images.: expected ‘inline’ to equal ‘block’_
When I apply display: block to #img-div nothing happens? If I apply it to #image then I lose my nice and centred layout and still get the error!
The original images width is 625px so I’ve specified max-width: 625px;
anyone have any ideas???
here’s what I have so far;
here you go. Just use this code instead:
Ah hbar1st your a life saver! I forgot about the margin-left: auto; and margin right: auto; trick!
Thank you so much!
does not work for me. my image is 600px and i just substituted the values. nothing changed
This should work
it did. thanks
what was the problem please?
It isn’t working.What shall I do then?
did you manage to solve the issue? if not, what have you tried and how did it turn out?
Worked perfectly fine por me, many thanks!
Didn’t work for me. I wonder why
You need to assign a max-width: 100% to your image and make sure its parent element has a set width too. For example the container could be 900px, if you set the image inside it to a max width of 100%, it is therefore responsive but cannot flow outside of its container.
great pretty trick… totally forgot it thanks man
use max-width: 100%; height: auto; display: block;
please can one help me out
an stock on The <img> element should responsively resize, relative to the width of its parent element, without exceeding its original size.
I am having the same issue. I think this is the relevant code:
I have tried all the tweaks in this thread without any luck. I’m not allowed to post a link to my codepen.
it did not work and am not understanding what i have to do