I have a simple thumbnail with images and a caption for each image. The images do not have the same height but are always 125px. Captions can be short and long, they do not have the same height.
I want to align all of the images at the bottom so i can put the caption at the same level.
Did some research here and was able to align the images at the bottom, but without the caption
https://jsfiddle.net/0bzz7397/2/
.thumb {
display: flex;
flex-wrap: wrap;
align-items: flex-end;
}
.thumb > div {
flex: 0 0 125px;
background-color: white;
}
.thumb > div ~ div {
margin-left: 20px;
}
When i add the caption, well, it's a MESS!
https://jsfiddle.net/fuk45osb/1/
EDIT: i've included an example with multiple wrapped thumbs
https://jsfiddle.net/fuk45osb/5/
Basically, this is the effect i'm hoping for. Images with different height are all aligned at the bottom, and the caption starts at the same level. It's simple and clean.
Ive try using flexbox. But, maybe i'm wrong and there are better ways.
Any ideas how to achieve this ?