Align something to top of table cell

Discussion in 'HTML & Website Design' started by Raynor152, Dec 31, 2007.

  1. #1
    I've tried everything. What I need is to stick something (text,image, another table, whatever) to the very top of a table cell. Every time I add something it gets put in the middle of the table cell by default. I am using dreamweaver, if by chance you know a easy method using dreamweaver, but I can go in to the code and do what I need, just tell me how I should do it. Maybe using CSS ?
     
    Raynor152, Dec 31, 2007 IP
  2. HDaddy

    HDaddy Active Member

    Messages:
    287
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #2
    i´m not sure but this might do the trick. In your html code where you want to put the image, put this:

    <img src="yourimagefolder/image.jpg" align="top, left, middle, right" border "0" alt="text descriping image"/>

    I think that align attribute works for everything.

    hope this helps !
     
    HDaddy, Dec 31, 2007 IP
  3. Raynor152

    Raynor152 Member

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    Thx, but it doesn't work :( I don't know why. The alight attribute works for "left","center" and "right" but not for "top". I am trying to apply it to a table inside another table cell.
     
    Raynor152, Dec 31, 2007 IP
  4. HDaddy

    HDaddy Active Member

    Messages:
    287
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #4
    try this one:

    <img border="0" src="yourimagefolder/image.jpg" style="margin:whatever px amount for top, bottom, left, right" alt="text descriping image"/>

    don´t know if the style attribute works for tables, but try it.
     
    HDaddy, Dec 31, 2007 IP
  5. dancom96

    dancom96 Well-Known Member

    Messages:
    1,556
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    105
    #5
    Try <td valign="top">
     
    dancom96, Dec 31, 2007 IP
  6. HDaddy

    HDaddy Active Member

    Messages:
    287
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #6
    yes i think that´s it. I don´t use tables, so don´t know much of them.
     
    HDaddy, Dec 31, 2007 IP
  7. Raynor152

    Raynor152 Member

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #7
    Thx, that did it :)

    I knew it was something related with vertical aligment but I wasn't able to do it in dreamweaver. Gues code is better :) Happy new year.
     
    Raynor152, Dec 31, 2007 IP