Hi There,

I'm trying to figure out the best method of marking up this list of images with captions. The images vary in height and the captions are aligned to the right of the images, sometimes with two lines of text and as close to vertically centered with the image as possible
See the below image for what I'm trying to achieve. I'd be tempted to use a definition list, floating the captions to the right, but getting each bit of text aligning correctly without styling each individual caption has got me stumped.

There will be a lot more images than those shown (the grey boxes are representing the images just to clarify), so a solution that works without resorting to applying diferent classes to each caption would be amazing!

Recommended Answers

All 3 Replies

See the below image for what I'm trying to achieve.

Sorry, not seeing the below image? You can drag it into the text box or click the little paperclip in the editor toolbar.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.