The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS centering image in


  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #45196

    Here is my example

    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 :)

    Jozsef K.

    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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.