62 users online (1 members and 61 guests)  


  Results 1 to 6 of 6

Related

  1. tables and text boxes    Forum: Website Scripts Forum
    Replies: 1
  2. Aligning Text to an image ...    Forum: CSS Forum
    Replies: 4
  3. Replies: 2
  4. aligning tables in html    Forum: HTML Forum
    Replies: 1
  5. CSS Text & Links in Tables    Forum: CSS Forum
    Replies: 2
  1. #1
    Coop~'s Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2004
    Posts
    6

    Aligning Text in Tables

    In my table i want some text to be aligned to the left and some text on the same line to be aligned to the right
    like so:
    TEXT: TEXT
    TEXT: TEXT
    Is this possible?
    thanks

  2. #2
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    Just put 2 cells in each row and give each cell its own align attribute.

    Dave

  3. #3
    Coop~'s Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2004
    Posts
    6
    Ah, i was trying to avoid that cause im lazy :P
    thanks

  4. #4
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732
    Hi there Coop~,

    As you do not wish - for personal reasons - to use two cells
    then you had better only use one - in this manner...
    Code:
    <html>
    <head>
    <style type="text/css">
    /*<![CDATA[*/
    table {
        width:300px;
        border:solid 1px #000000
      }
    #left {
        float:left
      }
    #right {
        float:right
      }
     /*//]]>*/
    </style>
    </head>
    <body>
    <table><tr>
    <td>
    <span id="left">this<br />and that<br />over there</span>
    <span id="right">is some<br />more of <br />this</span>
    </td>
    </tr></table>
    </body>
    </html>
    coothead

  5. #5
    krak_d's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Mar 2004
    Location
    Liverpool
    Posts
    166

    Exclamation

    Hi,

    CSS would be the prefered method for alignment as align=left/center/right is a deprecated attribute.

    krak_d

  6. #6
    Doorknob's Avatar
    Super Newbie

    Status
    Offline
    Join Date
    Jun 2002
    Location
    Malaysia
    Posts
    316
    Even if you're lazy, typing out two cells is still far easier than any other method. The simplest way is usually the best

    Take it from me, I try to find out all the shortcuts



Tags for this Thread