Vertically aligning text based on the height of an image

Discussion in 'CSS' started by maizey, Jul 27, 2006.

  1. #1
    Hi,

    I am trying to achieve a layout which uses unordered lists.

    Within the LI, there is an image and some text. The images are all different heights though.

    The issue i'm having at the moment is how can I make the text vertically align within the LI? Keep in mind that I can't put a height on as each image changes height. And these lists will be generated dynamically probably - so I don't really want to specify individual heights for each one... To make it even more difficult, the text may end up spanning onto two lines at some stage if i have to enter a larger description - so that also needs to be kept in mind.

    I've been looking around all morning for examples of how to do this and I can't find anything - so any help would be greatly appreciated!!!

    Here is what I'm trying to achieve:
    http://www.joshsphotos.com/user_interface/final_look.gif

    Here is the HTML at present:
    http://www.joshsphotos.com/user_interface/

    And the CSS:
    http://www.joshsphotos.com/user_interface/css/style.css

    Thanks!
     
    maizey, Jul 27, 2006 IP
  2. akram

    akram Peon

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    Try this CSS style

     
    akram, Dec 11, 2007 IP