Formatting html tables

Discussion in 'HTML' started by K., May 27, 2008.

  1. K.

    K. Guest

    Hello!

    I have a problem with formatting tables.

    I have such code (it is not the exact code I have but I simplified the
    example):

    <table>
    <tr>
    <td>
    <table style="border: 1px solid black;"> //table 1
    <tr>
    <td>
    test<br>
    test
    </td>
    </tr>
    </table>
    </td>
    <td>
    <table style="border: 1px solid black;"> //table2
    <tr>
    <td>
    test<br>
    test
    </td>
    </tr>
    </table>
    </td>

    </tr>
    </table>

    I know that such code is not so good, but please write me how I can achieve
    such thing

    I would like both "table1" and "table2" to have the same equal heights. I
    would like to
    build such "table1" and "table2" which will have equal heights i.e.
    if "table1" will have 3 "records" of "test" word separated by <br> tag, the
    height of "table2" should fit to "table1"
    if "table2" will have 3 "records" of "test" word separated by <br> tag, the
    height of "table1" should fit to "table2".
    I also add that both "table1" and "table2" have border lines rounded by the
    whole <table>

    Please help me
    Every help really apprieciated
    M.
    K., May 27, 2008
    #1
    1. Advertising

  2. Scripsit K.:

    > I have a problem with formatting tables.


    Rule of thumb: You are allowed to use a simple layout table, with no
    nested tables, and with no pixel-width settings, if you find this
    simpler to do than CSS formatting. Otherwise, stay away from using
    tables for layout, as opposite to using them for tabular data
    structures.

    > I have such code (it is not the exact code I have but I simplified the
    > example):


    You should have posted the exact URL. You have now isolated the
    important part away from your snippet, and you are not helping us to
    help you to find a better approach than nested tables.

    > I know that such code is not so good, but please write me how I can
    > achieve such thing


    Why would we help you to do something that you (and we) know to be
    wrong?

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, May 27, 2008
    #2
    1. Advertising

  3. K.

    dorayme Guest

    In article <g1gnhp$e4t$>,
    "K." <> wrote:

    > Hello!
    >
    > I have a problem with formatting tables.
    >
    > I have such code (it is not the exact code I have but I simplified the
    > example):
    >
    > <table>
    > <tr>
    > <td>
    > <table style="border: 1px solid black;"> //table 1


    >
    > I know that such code is not so good, but please write me how I can achieve
    > such thing
    >
    > I would like both "table1" and "table2" to have the same equal heights. I
    > would like to
    > build such "table1" and "table2" which will have equal heights



    > Please help me as i am standing on the edge of a cliff and
    > if I don't get the solution in 30 secs I will jump and
    > it will be all your fault's.


    In that case, you better look at:

    <http://dorayme.890m.com/alt/equiTables.html>

    --
    dorayme
    dorayme, May 28, 2008
    #3
  4. K.

    Roy A. Guest

    On 27 Mai, 12:24, "K." <> wrote:
    > Hello!
    >
    > I have a problem with formatting tables.
    >
    > I have such code (it is not the exact code I have but I simplified the
    > example):
    >
    > <table>
    >     <tr>
    >         <td>
    >             <table style="border: 1px solid black;">  //table 1
    >                 <tr>
    >                     <td>
    >                         test<br>
    >                         test
    >                     </td>
    >                 </tr>
    >             </table>
    >         </td>
    >         <td>
    >             <table style="border: 1px solid black;">   //table2
    >                 <tr>
    >                     <td>
    >                         test<br>
    >                         test
    >                     </td>
    >                 </tr>
    >             </table>
    >         </td>
    >
    >     </tr>
    > </table>
    >
    > I know that such code is not so good, but please write me how I can achieve
    > such thing


    That code is not good. Just shift your last table with a div element.
    And use CSS to style the rest, like table cells.
    Roy A., May 28, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mark
    Replies:
    2
    Views:
    450
  2. Peter Bassett
    Replies:
    3
    Views:
    917
    Augustus
    Aug 15, 2003
  3. Otuatail

    Tables within tables

    Otuatail, Jul 31, 2004, in forum: HTML
    Replies:
    7
    Views:
    486
  4. Replies:
    1
    Views:
    345
    Travis Newbury
    Jun 4, 2005
  5. Chris Brat
    Replies:
    5
    Views:
    689
    =?iso-8859-1?q?Luis_M._Gonz=E1lez?=
    Aug 22, 2006
Loading...

Share This Page