Page 1 of 1

Table span( rows and columns)

Posted: Fri Dec 12, 2008 5:30 am
by lynchpin
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.

Re: Table span( rows and columns)

Posted: Sat Dec 13, 2008 2:01 am
by SteveC
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.

Re: Table span( rows and columns)

Posted: Mon Dec 15, 2008 11:02 am
by pickle
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.

Re: Table span( rows and columns)

Posted: Tue Dec 16, 2008 4:35 am
by lynchpin
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.

Re: Table span( rows and columns)

Posted: Tue Dec 16, 2008 4:40 am
by papa
<table>
<tr>
<td colspan="3">Names</td>
</tr>
<tr>
<td>Some Name</td>
<td>Another name</td>
<td>I love Papa</td>
</tr>
</table>