CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Html Table

  1. #1
    Join Date
    Jul 2008
    Posts
    9

    Html Table

    Hi. This is Adi. I have a problem to combine the contents of two HTML tables.
    I have two HTML Tables.

    FIRST TABLE:
    The first Table is the one which displays the Heading of the columns.

    SECOND TABLE:
    The second table is the one which displays the values of the columns. It prints the values from the database and it contains a scroll bar to scroll from top to bottom.

    My Problem:
    When i am trying to join the two tables, the values are not getting printed under there respective headings. I mean the alignment is messed up.

    Please can anyone help me how to get out of this problem. I am stuck in here from yesterday.

    Waiting for the reply.
    Thanks in advance.

  2. #2
    Join Date
    Mar 2008
    Location
    IRAN
    Posts
    811

    Re: Html Table Help

    try this:

    Code:
    <table align = center width=100% id="table1">
      <tr>
        <td width = 25%>head1</td>
        <td width = 25%>head2</td>
        <td width = 25%>head3</td>
        <td width = 25%>head4</td>
      </tr>
    </table>
    
    <table align = center width=100% id="table2">
      <tr>
        <td width = 25%>data1</td>
        <td width = 25%>data2</td>
        <td width = 25%>data3</td>
        <td width = 25%>data4</td>
      </tr>
    </table>
    Touraj Ebrahimi (toraj_e yahoo)

  3. #3
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Html Table

    By :
    Quote Originally Posted by adi501
    I mean the alignment is messed up.
    What do you mean, how is it messed up ¿ Give an example

  4. #4
    Join Date
    May 2002
    Posts
    10,943

    Re: Html Table

    Welcome to the forums adi.

    For future reference, when you have a problem, create one...and only one thread in the correct forum. If it is not posted in the correct forum, then simply click the little red triangle with the exclamation point inside. That is the report post tool. Then ask that the thread be moved to the appropriate forum.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  5. #5
    Join Date
    Jul 2008
    Posts
    2

    Re: Html Table

    you just set the width of each cell from the header table to be the same as the width of each cell from the content table, and they should align up okay.

    on the other hand, why can't you put them all into one table?

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured