Click to See Complete Forum and Search --> : How to incorporate an <HR> tag in a table?


cakeday
07-07-2003, 12:05 PM
I have a table, ideally, i would like the border="0".

a record is consisted of 2 rows and several columns.

what i want is a line after each record.

This table is within a loop and is populated with data from the database.

e.g.

table header:
row1(1)
row1(2)
<hr>
row2(1)
row2(2)
<hr>
row3(1)
row3(2)
<HR>

and so on and so forth..

My code right now looks like,
<table border="0">
<TR>
<TH>HEADER1</TH>
<TH>HEADER2</TH>
<TH>HEADER3</TH>
<TH>HEADER4</TH>
<TH>HEADER5</TH>
<TH>HEADER6</TH>
<TH>HEADER7</TH>
<TH>HEADER8</TH>
<TH>HEADER9</TH>
</TR>

LOOP
CODE...............(that populates the table)

<TR>
<TD>DATA1</TD>
<TD>DATA2</TD>
<TD>DATA3</TD>
<TD>DATA4</TD>
<TD>DATA5</TD>
<TD>DATA6</TD>
<TD>DATA7</TD>
<TD>DATA8</TD>
<TD>DATA9</TD>
</TR>
<TR>
<TD>DATAa</TD>
<TD>DATAb</TD>
<TD>DATAc</TD>
<TD>DATAd</TD>
<TR>
<hr>

END LOOP
</TABLE>

Basically, after each record(which consists of 2 rows, i want a horizontal line to seperate the records..)

Any idea how can i do this.. this is very important to me, any help will be highly appreciated..
THank you in advance.

Khalid Ali
07-07-2003, 12:22 PM
create another tr after 2 rows and in a tr create a td adn then put the hr element

Fang
07-07-2003, 12:24 PM
Add this line after each record set:
<tr><td colspan="9"><hr size="1" width="100%" /></td></tr>

cakeday
07-07-2003, 12:34 PM
Thank you, Khalid Ali. IT WORKS!!