Tribute Page, how to center this element?

Tribute Page, how to center this element?
0

#1

Hi!
I’m making now my Tribute Page, but i have a problem.

I would like to have figure and figcaption in center, but when i do this, then the title isn’t only on img, like in here:

Do you know how to make it in cenetr and with size of the img only?
I have no idea how to solve it


#2

Ok,
friend helped me (after 3h of searching and this post)
I have just add left: 33.33%; right: 33.3% to figure and it is working :slight_smile:

EDIT:

nooooo, it’s not working :frowning: it isn’t perfectly in center


#3

You can set the figure element to block, so it takes up the full width and the img to inline-block so it’s width is only the length necessary to hold its content. This will allow you to use ‘text-align: center’ on the figure element to center its content (the img element and ficaption).