#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    486
    Rep Power
    46

    A table question


    I am trying to get text to align to the top of 3 table cells where one cell is populated with more text that the other two cells.

    It just doesn't want to seem to work.

    Here is my code:
    Code:
    <table border=0 cellspacing=15 style="width: 100%;">
      <tr>
        <td align="justify" style="width: 32%">Welcome to the first edition of the new Meter Ship "Town Caller" newsletter. Our goal for creating this source of information is to provide the Meter Ship Homeowners an interesting and educational resource for current events and just generally what is going on in the Meter Ship Community and what is happening in general in the Meter Ship that concerns Meter Ship residents. With coming we will try to publish the most accurate and factual information available at the time of the writing. Our articles will be published by our current General Manager and now "Editor In Chief", Karen Gomez. <image=karen.jpg>
        </td>
        <td align="justify" style="width: 32%">Please Contact the Architectural Committee with comments, inquiries or concerns using the form below
        </td>
        <td align="justify" style="width: 32%">Please Contact the Architectural Committee with comments, inquiries or concerns using the form below
        </td>
      </tr>
    </table>
    My problem is that the first cell is populated fuller than cell two or cell three, but cell two and cell three have the text centered in the cells and I need the text to be at the top of the cell.

    Nothing I have done makes any difference...the text in the right two cells stays centered.

    Anyone have an idea of what is going on?

    Thanks,

    Wes
  2. #2
  3. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,066
    Rep Power
    1990
    Do some research on the CSS 'vertical-align' property, and apply that to your <tr> tags.

    Comments on this post

    • additude agrees : Appreciate
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    486
    Rep Power
    46
    Thanks, I knew valign.....

    It's a long day when "verticle" registers in the mind as side to side instead of top to bottom....

    Glad I got some sleep.

  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2012
    Posts
    3
    Rep Power
    0
    You can adjust your text with use of span align center.

    Comments on this post

    • Catacaustic disagrees : Wrong. Please take the time to read the question. Align center won't help VERTICAL alignment.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    486
    Rep Power
    46
    What I ended up doing that has seemed to work for me is:
    Code:
    <td valign="top" style="width: 32%" style="word-wrap: break-word">
    <div style="text-align: justify; text-justify: newspaper">
    Thanks for the help.

IMN logo majestic logo threadwatch logo seochat tools logo