SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Jan 2005
    Posts
    204
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb having tables side by side

    i am having some nested table where by i have many tables in one big table this way:

    Code:
    <table name="bigtable"><tr><td>
    <table name="table1"><tr><td>&nbsp;</td></tr></table>
    <table name="table2"><tr><td>&nbsp;</td></tr></table>
    </td></tr>
    </table>
    i want the table1 and table2 to be arranged side by side. but from the code i am having above, the table1 is shown with a line break. which means, table1 is on top of table2. i don't want it this way as i needed it to be side by side. how could i do that?

    Thanks.

  2. #2
    SitePoint Zealot coothead's Avatar
    Join Date
    Jan 2005
    Location
    Chertsey, London, England
    Posts
    158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there x[E]nOn,

    does this help...
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <style type="text/css">
    <!--
    #bigtable {
        border:2px solid #999;
     }
    #table1,#table2 {
        width:200px;
        border:1px solid #000;
        margin:5px;
        float:left;
    }
    -->
    </style>
    
    </head>
    <body>
    
    <table id="bigtable"><tr><td>
    <table id="table1"><tr><td>table1</td></tr></table>
    <table id="table2"><tr><td>table2</td></tr></table>
    </td></tr>
    </table>
    
    </body>
    </html>
    coothead

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    Coventry, UK
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Like this:

    Code:
    <table name="bigtable"><tr><td valign="top">
    <table name="table1"><tr><td>&nbsp;</td></tr></table>
    </td><td valign="top">
    <table name="table2"><tr><td>&nbsp;</td></tr></table>
    </td></tr>
    </table>
    Adam


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •