Tribute project problem

the userstory asked me to center my image while also put display:block; in the responsive image class ,how can i do to center the image with its parent element?

Hi, there are many ways to center an image, one of them:

img {
  display: block;
  margin-left: auto;
  margin-right: auto;

When you ask questions it’s helpful for others if link to your code on codepen or jsfiddle, or even post the code directly in your question.

1 Like

this is my code can u see whrs the problem?

Remove vertical-align:middle and change margin-left to margin: 0 auto. It will do the work.

1 Like