Hello guys!
I’m having a problem, I cannot resize the image responsively. What am I doing wrong?
Challenge: Build a Tribute Page
Link to the challenge:
Hello guys!
I’m having a problem, I cannot resize the image responsively. What am I doing wrong?
Challenge: Build a Tribute Page
Link to the challenge:
Change your code to this:
img {
width: 100%;
max-width: 1000px;
height: auto;
margin: 0 auto;
display: block;
}
You have to add width
and max-width
to the image selector in order to make it responsive. Also add display: block
to be able to center the image using margin: 0 auto
.
I hope that helps you out!
Thank you very much!!! The display block was the one missing for the code to work.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.