39 users online (0 members and 39 guests)  


  Results 1 to 8 of 8

Related

  1. Replies: 2
  2. Replies: 3
  3. Side Bar Target    Forum: CSS Forum
    Replies: 5
  4. tables appear side by side?    Forum: HTML Forum
    Replies: 1
  5. Side img    Forum: CSS Forum
    Replies: 2
  1. #1
    trainstroker's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2004
    Posts
    1

    Exclamation Please Help

    http://www.freewebs.com/trainstroker/index.htm
    i am trying to create a table next to another table.the table already on the page is my navigation type table.i am trying to get another table right next to it in the center with text in it and having only a top border.any help???

  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
    Sounds like you are looking for nested tables.

    Try this code
    HTML Code:
    <table>
    <tr>
    <td valign="top">
    <table>
    <tr>
    <td>
    left content
    </td>
    </tr>
    </table>
    </td>
    <td valign="top">
    <table>
    <tr>
    <td>
    right content
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>

  3. #3
    Pattaya-Web's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2011
    Posts
    3

    Exclamation Re: Side by side html tables

    Hi.
    I tried this but I'm not getting the rsult that I want.

    I want to have an overall table size of 245px
    The left column will take an Adsense script for a 120 x 240 ad and the right column will take two scripts for 2 x 125px square ads.

    I can either get the two right side ads displaying or the left side and one of the 125 x 125 square adds.

    Thanks for any suggestions.

  4. #4
    keytone's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2011
    Posts
    11

    Re: Side by side html tables

    Is this something like what you want to do?

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <title>some tables</title>

    <style type="text/css">
    #menus {
    overflow:hidden;
    }
    #left-table, #right-table {
    float:left;
    }
    #left-table {
    margin-right:1px;
    }

    h1 {font-size:30px;}
    h2 {font-size:25px;}
    </style>
    </head>

    <body>


    <div id="tables">
    <table border="1" width="100%">
    <tr>
    <td>

    <table border="1" id="left-table">
    <tr>
    <td width="120px" height="240px">
    Left table content
    </td>
    </tr>
    </table>


    <div id="tables">
    <table border="1" id="right-table">
    <tr>
    <td width="125px" height="240px">
    right table content
    </td>
    </tr>
    </table>

    </td>
    </tr>
    </table

    </body>
    </html>
    Last edited by keytone; 02-09-2011 at 08:34 AM.

  5. #5
    keytone's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2011
    Posts
    11

    Re: Side by side html tables

    I made a mistake with above code, this might be closer to what you want. The dimensions you're using makes it come out with the left column a little shorter than the right.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <title>some tables</title>

    <style type="text/css">
    #menus {
    overflow:hidden;
    }
    #left-table, #right-table {
    float:left;
    }
    #left-table {
    margin-right:1px;
    }

    h1 {font-size:30px;}
    h2 {font-size:25px;}
    </style>
    </head>

    <body>


    <div id="tables">
    <br>
    <br>
    <table border="1" id="left-table">
    <tr>
    <td width="120px" height="240px">
    Left content
    </td>
    </tr>
    </table>


    <div id="tables">
    <table width=125px" height=250px
    <tr>
    <td>
    <table border="1" id="right-table">
    <tr>
    <td width="125px" height="125px">
    right content
    </td>
    </tr>
    </table>
    </td>
    </tr>

    <tr>
    <td>

    <table border="1" id="right-table">
    <tr>
    <td width="125px" height="125pxpx">
    right content
    </td>
    </tr>
    </table>

    </td>
    </tr>


    </td>
    </tr>
    </table>

    </body>
    </html>

  6. #6
    Pattaya-Web's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2011
    Posts
    3

    Re: Side by side html tables

    Thanks very much Keytone. Sorry for taking so long to reply. The system alert has been sitting in one of my inboxes for a long time.

    It works perfect for the side-by-side placement but it ads a fairly large top blank margin above both columns. Apart from that it's great thanks.

  7. #7
    firestone's Avatar
    New User

    Status
    Offline
    Join Date
    Jun 2011
    Posts
    13

    Re: Side by side html tables

    is this code is working or not

  8. #8
    Pattaya-Web's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2011
    Posts
    3

    Re: Side by side html tables

    yep. works fine.



Tags for this Thread