apply flexbox to a wrapper containing captions, instead of the caption itself