Hello,
I have a problem displaying data in my table. I want to display some names in multiple columns under the same row. I got an example that spans the names into multiple rows, but i want them spanned to multiple columns, but i dont know if this is possible.
Here's the row span example;
--------------------------------------
<table>
<tr><td>Names</td>
<td>
<span class="smallfont">Some Name</span>
<span class="smallfont">Another name</span>
<span class="smallfont">Any other name</span>
</td>
</tr>
</table>
---------------------------------------
but i need the rows to span(columns) and form like a long single line sentence.
Thanks.
Table span( rows and columns)
Moderator: General Moderators
Re: Table span( rows and columns)
It'd help if you provide us with the code you're using for small font also.
I would think you'd need to include display:block in your style for the spans.
I would think you'd need to include display:block in your style for the spans.
Re: Table span( rows and columns)
What do you want it to look like? Can you draw a picture, complete with where you expect the table cell borders to be? As it is, your spans will be on one text line, but may be broken up into multiple lines by the browser if the table cell is too narrow.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: Table span( rows and columns)
I want the table to look something like this.
Table
**********************************************
| row 1 | Name1, Name2, Name3, Name4, Name5, Name6' |
-----------------------------------------------------------
| row 2 | NameA, NameB, NameC, NameD, NameE, NameF |
-----------------------------------------------------------
| row 3 | ........, ........., ..........................................' |
-----------------------------------------------------------
| row 4 | ...............................................................' |
-----------------------------------------------------------
| row 5 | ...............................................................' |
**********************************************
The hyphens at the end are just to help align this demo table.
Thanks.
Table
**********************************************
| row 1 | Name1, Name2, Name3, Name4, Name5, Name6' |
-----------------------------------------------------------
| row 2 | NameA, NameB, NameC, NameD, NameE, NameF |
-----------------------------------------------------------
| row 3 | ........, ........., ..........................................' |
-----------------------------------------------------------
| row 4 | ...............................................................' |
-----------------------------------------------------------
| row 5 | ...............................................................' |
**********************************************
The hyphens at the end are just to help align this demo table.
Thanks.
Re: Table span( rows and columns)
<table>
<tr>
<td colspan="3">Names</td>
</tr>
<tr>
<td>Some Name</td>
<td>Another name</td>
<td>I love Papa</td>
</tr>
</table>