Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Help With Captions

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #34171
    realph
    Participant

    Hey Guys,

    Ran into a bit of a problem I’m not sure how to solve. I’ve got this gallery page which consists of thumbnails, each thumbnail has a caption to go with it. The problem I’m having is when a caption has more than one line of text the caption box gets bigger, that’s fine and all but I’d like the caption box to be aligned to the bottom so it looks normal.

    This is how it looks at the moment:


    And here’s the CSS:

    .ngg-caption {
    position: relative;
    padding: 5px 0 5px 25px;
    text-align: left;
    z-index: 89;
    font-size: 1.3em;
    line-height: 1.5em;
    color: #fff;
    background-color: #000;
    bottom: 32px;
    }

    I hope I’ve explained what I’m trying to do, any help would be appreciated.

    Thanks in advance.

    #86090
    realph
    Participant

    I’m not using

    , should I be using it?

    Here’s a link: http://www.ericouture.com/gallery/test-page/

    #86093
    realph
    Participant

    Ok, but what if I want the caption to sit on top of the image, keeping the bottom part of the caption aligned to bottom most part of the image?

    #86120
    realph
    Participant

    That’s perfect Paulie, thanks! I’ll let you know how I get on.

    #86136
    wolfcry911
    Participant

    Here’s an even simpler version – it eliminates the unnecessary p inside figcaption
    http://jsfiddle.net/NZKBH/28/

    #86156
    realph
    Participant

    Thanks a bunch @wolfcry911!

    #86157

    Nice work @wolfcry911. I have taken it a step further just for fun: http://jsfiddle.net/sl1dr/44ZpX/

    #86158
    realph
    Participant

    @wolfcry911, So finally I’m trying to add a credit to the thumbnail, but I’m not sure if I’m using vertical-align correctly. The aim is to have the credit centered vertically.

    Here’s my fiddle at the moment:
    http://jsfiddle.net/NZKBH/50/

    #86162
    wolfcry911
    Participant
    #86188
    realph
    Participant

    Perfect @wolfcry911, why didn’t I think of using a background image? You’ve been a huge help, I owe you one!

    Thanks again!

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘CSS’ is closed to new topics and replies.