How to align a graphic and text vertically

I am not sure if I can do what I want to do, so I hope someone can help.

I have an Xway page which is my gallery page. It has 12 graphics in 4 row of 3.

I would like to add text under each graphic as in a title of the image but I need the graphic and the text to remain aligned, centred vertically when the page is viewed either on a computer screen or tablet

Is it possible to align a graphics to a text box, or lock them together or am I way off target and it can’t be done

Thanking you in anticipation

Regards

Gary

I’m doing this too. Seems OK to put text inside the container box that the graphic is in.

Thanks Catherine. I must be doing something wrong as I can’t get the text inside the graphic box with the graphic. 'll have another try in the morning.

Hi Gary,

You can’t put text in a graphic box, but you can put graphics in container boxes, as Catherine mentioned.

Here’s a sample document that might help, although it’s possible that I’ve misunderstood what you mean by vertically aligned. The gallery box is a flex container that is set to wrap, and each of the flex items within this container is itself a flex container with column direction (so the text box containing the caption is placed in a vertical column beneath the graphic).

Image Gallery.zip (258.6 KB)

If you preview this on a phone or tablet (or using Safari’s Responsive Design Mode), you should see that there are fewer image/caption boxes per line on narrower screens. You can control how many by adjusting the width, minimum width, and maximum width for each image/caption box.

Another option is you could use Exhibeo to create an image gallery, and import this as an Xway component.

Hi Jeremy,

Thank you for reply and the file. It’s perfect.

Appreciate your help

Regards Gary

1 Like