Please help with centering image

may i know how to center the image in this particular project to its parent element

you can check this site How To Center an Image … this might help :slight_smile:

You mean like this?

Hi @vishalbhat221 !

Welcome to the forum!

I edited your post to remove the link from the title.
You should avoid placing links in the title since we can’t click on them.

As to your question,
I would review that article @noxmaraba gave you on properly centering an image.

You did change the display to block but you are missing the margin property to center it. The article will show you how to do that.

When you do that then the test will pass.

Also, I would remove these style tags from your html section and place those styles in the css section.


See this:

max-width: 100%;

set the margin to be auto

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