Click to See Complete Forum and Search --> : Html Table


adi501
July 3rd, 2008, 11:33 AM
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.

toraj58
July 5th, 2008, 01:31 AM
try this:


<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)

HanneSThEGreaT
July 5th, 2008, 04:52 AM
By :
I mean the alignment is messed up.
What do you mean, how is it messed up ¿ Give an example

PeejAvery
July 7th, 2008, 08:35 AM
Welcome to the forums adi. :wave:

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.

iliiad
July 12th, 2008, 01:43 AM
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?