cannot figure out what to do to get the image centered
any help would be appreciated!
cannot figure out what to do to get the image centered
any help would be appreciated!
Hey @lmhga ,
You want to use justify-content: center
. In flexbox, align-items
and align-self
is aligning the elements Vertically (Up and Down). So justify-content
is aligning the elements Horizontally (left and right). Here’s for more Flexbox info: http://flexbox.malven.co/
Hope this helps
I’m still having a little trouble. The issue seems to be the the img is centered when the fig caption is not in the div, but I can’t get it to center when they are both children. I’ve tried various align-items, align-content, and flex-wraps but can’t seem to figure it out .
Hey again there ,
On this part of your code, You used justify-content
, which is a flex property.
Remember that you CANNOT use flex properties without declaring display:flex
first. So just by adding display: flex
on to the css, it will work again.