36 users online (2 members and 34 guests)  


  Results 1 to 7 of 7

Related

  1. #1
    hbass's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Mar 2004
    Location
    Colorado
    Posts
    71

    CSS and Captions

    Hi All,
    I am using css for my body copy and image formatting within tables, using code below for the images:
    IMG.icon {
    float: left;
    }
    IMG.icon2 {
    float: right;
    }

    Is there a way to put captions under these using css?

    Thanks,
    Heidi

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hiya,

    Best bet would be to make a div, put the image AND caption in the div, then float that instead of just the image.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    hbass's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Mar 2004
    Location
    Colorado
    Posts
    71
    I'll give it a try, thanks!

  4. #4
    hbass's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Mar 2004
    Location
    Colorado
    Posts
    71
    Alright, having difficulties...

    Okay, say I am inside my
    <td> and I have a
    <p>body copy</p>
    <img src="../images/avionics-pict1.jpg" width="271" height="174" class="icon">
    //--Under this image is where I want my caption
    <p>text</p>

    How would I add the floating div? I tried :
    <div class="icon"><img src="../images/avionics-pict1.jpg" width="271" height="174"><caption>Copy</caption></div>

    and it got all funky. What am I doing wrong?

  5. #5
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Could you define "all funky"? Or possibly give us a link so we can see. Thanks.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  6. #6
    hbass's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Mar 2004
    Location
    Colorado
    Posts
    71
    All Funky- adj. meaning rest of copy below image disappears, including caption within div, and content below div tag.
    Don't have time to upload a sample page today, I will get back with you tomorrow...
    thx

  7. #7
    hbass's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Mar 2004
    Location
    Colorado
    Posts
    71

    Thumbs up

    Sorry to take so long getting back, been swamped! Anywhoo, I figured out how to do it, I can just create a table around the image using the float css code on the table, and a new cell below the image with the caption. Thanks!



Tags for this Thread