Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2013
    Thanked 0 Times in 0 Posts

    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?


  2. #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Thanked 1,874 Times in 1,858 Posts
    Hello Antonel1,
    When putting captions with images it's easiest to just make a containing element to hold both. Look at how easy captions can be when you know the width of your containing element.

    For the varying width images, it might be easy to make a couple different sized boxes to hold them?
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use a DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts