The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › centering image in tag
Here is my example http://codepen.io/seraphzz/pen/etfvp
Why do you think the image is not centering within the figure tag. I tried to use margin: auto auto; to fix it, but it isn’t working. I need help lol. I appreciate your time looking and helping me learn better css :)
img { margin:0 auto } should work just fine. Of course you need to make img a block element with img { display:block } otherwise it won’t work.