53 users online (0 members and 53 guests)  


  Results 1 to 6 of 6

Related

  1. Replies: 0
  2. Keep It Simple S****d    Forum: HTML Forum
    Replies: 3
  3. Replies: 2
  4. Replies: 2
  1. #1
    Kire's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2004
    Posts
    1

    How to make simple tables?

    I simply just want a table that divides my screen in half.
    If you could please help me because I dont know how to make them.

  2. #2
    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 Kire,

    Welcome to these forums

    This table divides the screen vertically...
    Code:
    <html>
    <head>
    <title>vertical cells</title>
    <style type="text/css">
    <!--
    body
       {
        background:#aaaaff;
       }
    table
       {
        background:#ffffff;
        width:100%;
        height:100%;
        border:solid 1px #000000;
       }
    td
       {
        background:#aaaaaa;
        width:50%;
        height:100%;
        border:solid 1px #000000;
       }
    //-->
    </style>
    </head>
    <body>
    <div>
    <table><tr>
    <td>left side</td><td>right side</td>
    </tr></table>
    </div>
    </body>
    </html>
    and this table divides it horizontally...
    Code:
    <html>
    <head>
    <title>horizontal cells</title>
    <style type="text/css">
    <!--
    body
       {
        background:#aaaaff;  
       }
    table
       {
        background:#ffffff;
        width:100%;
        height:100%;
        border:solid 2px #000000;
       }
    td
       {
        background:#aaaaaa;
        width:100%;
        height:50%;
        border:solid 1px #000000;
       }
    //-->
    </style>
    </head>
    <body>
    <table><tr>
    <td>top half</td>
    </tr><tr>
    <td>bottom half</td>
    </tr></table>
    </body>
    </html>
    I hope that this gets you started

    cthead

  3. #3
    jazinc's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2004
    Posts
    4
    coothead is right here, but, since you say you dont know how to make tables, i think that it could get alittle more basic then that (without the big long stylesheet for a simple table)
    HTML Code:
    <TABLE HEIGHT=100% WIDTH=100% STYLE="border:solid 1px #000000">
     <TR>
      <TD>cell 1</TD>
      <TD>cell 2</TD>
     </TR>
    </TABLE>
    and if you want, i have some good sites for some tutorials on tables
    http://www.w3schools.com/html/html_tables.asp
    http://hotwired.lycos.com/webmonkey/authoring/tables/
    hope it helps

    -jaz

  4. #4
    Android's Avatar

    Status
    Offline
    Join Date
    Oct 2002
    Location
    I AM CANADIAN
    Posts
    440

    Smile

    That will give you cells side by side. If you want the table to divide the page in half, you could use:
    Code:
    <TABLE STYLE="height:100%;width:100%;border:solid 1px #000000">
     <TR>
      <TD style="width:100%;">cell 1</TD>
      <TD style="width:100%;">cell 2</TD>
     </TR>
    </TABLE>

  5. #5
    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 Android,

    I cannot discern any major difference between you code and that of the previous poster - 'jazinc '

    I will assume that it was just a 'typo' on your part that
    caused you to miss out...

    </TR><TR>

    in the appropriate spot

    Anyway I still contend that it is better to separate

    'presentation' from 'mark-up' as there is less chance
    of making erros in mark-up

    coothead

  6. #6
    Android's Avatar

    Status
    Offline
    Join Date
    Oct 2002
    Location
    I AM CANADIAN
    Posts
    440

    Red face Oops

    I meant "width:50%;" in the TD's.
    The difference I see is that in jazinc's post, the TD's will be only the width of the content. Mine (if it was correct) should split the screen vertically into two halves. Isn't that what was desired?
    Or did I misunderstand the original question:
    " I simply just want a table that divides my screen in half."
    It was a long night.



Tags for this Thread