forgive me if this is an easy fix. When I switched my display setting to block, my image was no longer centered. I wanat the size of image to be responsive to the web page and when I was trying to use “display: flex” and “justify-content: center” it wasn’t working either. can someone help here? thank you!
Can you try margin: auto;
on the img
element?
1 Like
nibble answered correctly. If you want to use flex, you have to add this style to its parent.
.classHasImage{display:flex;justify-content:center}