Table in a Table ?

Discussion in 'HTML' started by Florent, Sep 22, 2003.

  1. Florent

    Florent Guest

    Hello,
    I've got a problem to do this:

    how can I do a table like this :
    ____________________________
    | | | <- one table
    in the table
    --------------------------------------
    | | | | | <- another
    table in the table
    --------------------------------------

    My problem is that the browsner align all cells of all tables (?)
    Is there a way without the use of frames ?

    florent.
    Florent, Sep 22, 2003
    #1
    1. Advertising

  2. Florent

    Mark Parnell Guest

    Florent wrote:
    >

    [nested tables]
    > My problem is that the browsner align all cells of all tables (?)
    > Is there a way without the use of frames ?


    Probably. Why not tell us what you are actually trying to achieve, rather
    than what you think the solution is, and we may be able to help you.

    --

    Mark Parnell
    http://www.clarkecomputers.com.au
    Mark Parnell, Sep 22, 2003
    #2
    1. Advertising

  3. Florent

    brucie Guest

    In post <bknubu$k4m$>
    Florent said...

    > how can I do a table like this :
    > ____________________________
    >| | | <- one table
    > in the table
    > --------------------------------------
    >| | | | | <- another
    > table in the table
    > --------------------------------------


    i'm not sure what the above is supposed to look like.

    if you're going to use ASCII art then use a mono spaced font so it
    doesn't look like a huge mess.

    if you want a table aligned to the bottom of another tables cell use
    valign="bottom" in the <td>

    > My problem is that the browsner align all cells of all tables (?)
    > Is there a way without the use of frames ?


    don't use tables for layout. don't use frames. what are you really
    trying to do?


    --
    23/September/2003 08:54:39 am
    brucie, Sep 22, 2003
    #3
  4. Florent

    Florent Guest

    brucie wrote:

    >In post <bknubu$k4m$>
    >Florent said...
    >
    >
    >
    >>how can I do a table like this :
    >>____________________________
    >>| | | <- one table
    >>in the table
    >>--------------------------------------
    >>| | | | | <- another
    >>table in the table
    >>--------------------------------------
    >>
    >>

    >
    >i'm not sure what the above is supposed to look like.
    >
    >if you're going to use ASCII art then use a mono spaced font so it
    >doesn't look like a huge mess.
    >
    >if you want a table aligned to the bottom of another tables cell use
    >valign="bottom" in the <td>
    >
    >
    >
    >>My problem is that the browsner align all cells of all tables (?)
    >>Is there a way without the use of frames ?
    >>
    >>

    >
    >don't use tables for layout. don't use frames. what are you really
    >trying to do?
    >
    >
    >
    >

    sorry :)
    here is my code

    <html>
    <head>
    <meta http-equiv="content-type"
    content="text/html; charset=ISO-8859-1">
    </head>
    <style TYPE="text/css">
    .TiG {font-family: arial; font-size: 10pt; color: #F5F5EC;}
    .TiP {font-family: arial; font-size: 8pt; color: #F5F5EC;}
    .Ti {font-family: arial; font-size: 12pt; color: #F5F5EC;}
    .STi {font-family: arial; font-size: 10pt; color #66642B;}
    </STYLE>
    <body style="color: rgb(0, 0, 0); background-color: rgb(245, 245, 236);"
    link="#000099" vlink="#990099" alink="#000099">

    <table cellpadding="0" cellspacing="0" border="0" width="640px" height="*" ALIGN="center">
    <tr><td colspan=2>
    <table cellpadding="0" cellspacing="0" border="0"
    style="text-align: left; width: 640px;">
    <tr>

    <td rowspan=2><img src="img/logoMenu.gif" title="Logo" alt="Logo" style="width: 47px; height: 47px;"> </td>
    <td WIDTH="100%" HEIGHT="*" BGCOLOR="#CDCA9E"><br> </td>
    </tr>
    <tr HEIGHT="18px"> <td WIDTH="100%" BGCOLOR="#66642B" NOWARP ALIGN="LEFT">
    <table HEIGHT="18px" cellpadding="0" WIDTH="100%" VALIGN="bottom" >
    <tr>
    <td align="center"> <p class="TiG">Accueil</p> </td>

    <td align="left"> <p class="TiG">Java</p> </td>
    <td align="left"> <p class="TiG">Perl</p> </td>
    <td align="left"> <p class="TiG">Flash</p> </td>
    <td align="right"> <p class="TiP">Commentaires</p> </td>

    </tr>
    <table>
    </tr>
    </table>
    </td></tr>
    <tr><td VALIGN="TOP">
    <table cellpadding="0" cellspacing="0" border="0"
    width="120px" BGCOLOR="#CDCA9E">
    <tr> <td BGCOLOR="#FF8F0F" ALIGN="right"> <p class="Ti"><b>ACCUEIL</b></p></tr>

    <tr> <td align="left"> <p class="STi">SousMenu</p></tr>
    </table>
    </td><td> HELLO<br>My Name is<br> Flofloreent<br></td>
    </tr>
    </table></body>

    </html>

    The problem with this code is that the logoMenu.gif is not 'stuck' against the menu...
    and i don't see how to do

    is it a best explanation ? :)
    Florent, Sep 23, 2003
    #4
  5. Florent

    brucie Guest

    In post <bknvp2$ooj$>
    Florent said...

    > here is my code


    how about a URI instead so i don't have to guess how its supposed to
    look?

    > .TiG


    use meaningful class/id names.

    > {font-family: arial;


    you don't need to repeatedly specify a font-family.

    *{font-family:arial;} will apply to all elements but better yet don't
    specify a font-family or only the generic family then the visitor will
    see the text in their preferred font.

    *{font-family:sans-serif;}

    > font-size: 10pt;


    never use pt for font sizes. use ems or %. i recommend % as IE has a
    bug with ems. 100% is the visitors preferred font size.

    > color: #F5F5EC;}


    if you specify a color you should also specify the background color to
    avoid possible conflicts with the visitors colors.

    > <body style="color: rgb(0, 0, 0); background-color: rgb(245, 245, 236);"


    why use inline styles? body{... }

    > link="#000099" vlink="#990099" alink="#000099">


    use CSS

    > <table


    don't use tables for layout

    > width="640px"


    don't use fixed with designs. usability study after usability study
    show visitors prefer liquid layouts.

    > style="text-align: left; width: 640px;">


    again, don't use inline styles. it defeats one of the best features of
    CSS. defining once - change many

    > <img src="img/logoMenu.gif" title="Logo" alt="Logo" style="width: 47px; height: 47px;">


    use width="47" height="47" and meaningful alt text. alt="company xyz"

    > <tr HEIGHT="18px">


    height is not valid on a <tr> and the value of height in html doesn't
    include units. height="18"

    > The problem with this code is that the logoMenu.gif is not 'stuck' against the menu...
    > and i don't see how to do


    supply a URI so people can see the page, not make guesses of what it
    should be because they're missing the images.


    --
    23/September/2003 09:24:44 am
    brucie, Sep 23, 2003
    #5
  6. Florent

    brucie Guest

    In post <>
    brucie said...

    >> <tr HEIGHT="18px">


    > height is not valid on a <tr> and the value of height in html doesn't
    > include units. height="18"

    ^^^^^^^^^^^^
    for pixels


    --
    23/September/2003 09:48:10 am
    brucie, Sep 23, 2003
    #6
  7. Florent pounced upon this pigeonhole and pronounced:
    > <tr HEIGHT="18px"> <td WIDTH="100%" BGCOLOR="#66642B" NOWARP ALIGN="LEFT">
    > <table HEIGHT="18px" cellpadding="0" WIDTH="100%" VALIGN="bottom" >
    > <tr>
    > <td align="center"> <p class="TiG">Accueil</p> </td>
    >
    > <td align="left"> <p class="TiG">Java</p> </td>
    > <td align="left"> <p class="TiG">Perl</p> </td>
    > <td align="left"> <p class="TiG">Flash</p> </td>
    > <td align="right"> <p class="TiP">Commentaires</p> </td>
    >
    > </tr>
    > <table>
    > </tr>


    As far as I remember, you have to nest a table inside a <td> instead of a
    <tr>.

    That's what I remember. I stopped using tables for layout in the last
    millennium.

    --
    -bts
    -This space intentionally left blank.
    Beauregard T. Shagnasty, Sep 23, 2003
    #7
  8. Florent

    Richard Guest

    Florent wrote:

    > Hello,
    > I've got a problem to do this:


    > how can I do a table like this :
    > ____________________________

    || | | <- one table
    > in the table
    > --------------------------------------

    || | | | | <- another
    > table in the table
    > --------------------------------------


    > My problem is that the browsner align all cells of all tables (?)
    > Is there a way without the use of frames ?


    > florent.



    That's the major hangup when using tables. Any table within a table can not
    be adjusted in the manner you want it to. This is dictated by the use of
    <tr><td>.
    A <tr> is defined across the infinite width of the page.

    What you are attempting to do would best be done with <div>.
    Resaerch <div> and css attribute "float:".
    Trust me. Tables are dead.
    Richard, Sep 23, 2003
    #8
  9. Florent <> wrote in message news:<bknubu$k4m$>...
    > Hello,
    > I've got a problem to do this:
    >
    > how can I do a table like this :


    [snip nested table example]

    > My problem is that the browsner align all cells of all tables (?)
    > Is there a way without the use of frames ?


    http://dorward.me.uk/www/nested/
    Leif K-Brooks, Sep 23, 2003
    #9
  10. Florent

    Mark Parnell Guest

    Mark Parnell, Sep 23, 2003
    #10
  11. brucie wrote:

    > *{font-family:sans-serif;}


    or better yet:

    html{font-family:sans-serif;}

    and let everything else inherit. What's the difference? Think <pre> and
    <code>.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?id=132
    Toby A Inkster, Sep 23, 2003
    #11
  12. Florent

    brucie Guest

    In post <>
    Toby A Inkster said...

    >> *{font-family:sans-serif;}


    > or better yet:
    >
    > html{font-family:sans-serif;}
    >
    > and let everything else inherit. What's the difference?
    > Think <pre> and <code>.


    browsers don't always inherit. think <th> and <td>

    --
    23/September/2003 04:40:21 pm
    brucie, Sep 23, 2003
    #12
  13. Florent

    Florent Guest

    Thank everybody and for all your advice
    I will take a look at <DIV>
    florent

    Mark Parnell wrote:

    >Richard wrote:
    >
    >
    >>Trust me. Tables are dead.
    >>
    >>

    >
    >Unless you are presenting tabular data, of course :)
    >
    >
    >
    Florent, Sep 24, 2003
    #13
    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. David Williams
    Replies:
    2
    Views:
    1,122
    Jacob Yang [MSFT]
    Aug 12, 2003
  2. Ken Dopierala Jr.

    Do you use <table> or <asp:Table>?

    Ken Dopierala Jr., Jan 12, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    8,624
    Craig Deelsnyder
    Jan 13, 2004
  3. Earl Teigrob
    Replies:
    2
    Views:
    313
    Shintaro
    Feb 21, 2004
  4. Leonardo Gangemi
    Replies:
    0
    Views:
    315
    Leonardo Gangemi
    Apr 7, 2004
  5. Rio
    Replies:
    4
    Views:
    1,188
Loading...

Share This Page