Forums

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

Home Forums CSS centering image in

tag

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

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

    #137008
    Jozsef K.
    Participant

    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.