Click to See Complete Forum and Search --> : multiline tableheader for one of the columns


Rxyz
05-03-2006, 08:29 AM
need the table header as below.

col1|col2|col3|col4 firstline|col5|col6
| | |X | Y | Z | |

how to do this?

i.e multiline header for one of the columns?

i.e col4 should be 3 columns width.
right below it should be 3 columns X, Y,Z with the line above them. how to do this?

Thanks.

rbevers
05-03-2006, 10:21 AM
include a colspan="3" in the th tag

like <th colspan="3">col4</th>

Rxyz
05-03-2006, 10:29 AM
I tried giving the below. But

<th colspan="3"><p>Col 4<br>
____________________________________________<br>
<th>X</th><th>Y</th><th>Z</th> </p> </th>


the below is comming in a one column

Col4
____


and X, Y, Z columns are comming beside it.

want them as below
Col4
____________
X | Y | Z

How to do this?

Thanks.

Robert Wellock
05-03-2006, 11:19 AM
The ASCII art would have worked better in a monospace font as I cannot quite see what wants spanning. I assume you are using it for a data table and not misusing it for page layout.

Rxyz
05-03-2006, 11:51 AM
using it for data table itself.
one of the column should be as above.

not sure how to do it? I would appreciate your help.

one of the column should be as below. Have other columns before and after Income.

Income
__________________________
Loans | Deposits | Others
| |


Thanks.

Rxyz
05-03-2006, 03:04 PM
finally got this working using below

<thead>
<tr><th rowspan="2">Col1</th>
<th rowspan="2">Col2</th>
<th rowspan="2">Col3</th>
<th colspan="3">Income
<th rowspan="2">Col5</th></tr>
<tr><th>Loans</th><th>Deposits</th><th>Others</th><tr>
</thead>

But there is an extra empty column that's getting added at the end of the table.

Not sure why is that. How to remove that extra column? why is it getting added?

Thanks.