Wrap text under thumbnails of different width sizes
I have a page filled with thumbnails of different widths and heights. There is text that goes under each thumbnail. I want the text to stay within the parameters of the image width. I'm having problems getting the text not to exceed the width of the image.
Setting a width size for the text in css doesn't work because then it won't consider the images that are wider. Position absolute in css worked but the text no longer goes under the image but overlaps the image.
Can someone please help me solve this problem? What am I missing here?