data beside image

Discussion in 'HTML & Website Design' started by oo7ml, Aug 3, 2007.

  1. #1
    I have an image in a cell on a table. I have a figure beside that image but i can't get it to be inline with my image

    <td><img src="images/example.jpg">4.5</td>

    It shows up like this

    ||||||||
    ||||||||
    |||||||| 4.5

    but i want it like this

    |||||||
    ||||||| 4.5
    |||||||

    How do i ammend the code above to fix this
     
    oo7ml, Aug 3, 2007 IP
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    as you are already using a table then you just need to add the valign attribute to middle
     
    AstarothSolutions, Aug 3, 2007 IP
  3. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #3
    No, that doesn't work i tried that

    <td valign="middle"><img src="images/example.jpg">4.5</td>

    Anyone else got any other ideas
     
    oo7ml, Aug 3, 2007 IP
  4. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #4
    add style="vertical-align:middle;" to the img tag
     
    AstarothSolutions, Aug 3, 2007 IP
  5. Jezek

    Jezek Peon

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Jezek, Aug 3, 2007 IP