Some of you may not particularly care about this, and some of you may have already figured this out. But I haven't seen it posted if anyone has.
There has always been a problem getting tables to display properly on this forum board. The table itself seems to work, but there is always a bunch of blank space before the table starts. Annoying and looks wierd. I have figured out whats causing it and how to avoid it.
The following table code:
code:
<table border=1 cellspacing=1>
<tr>
<td>First cell of first row</td>
<td>Second cell of first row</td>
</tr>
<tr>
<td>First cell of second row</td>
<td>Second cell of second row</td>
</tr>
</table>
Will display like this:
First cell of first row |
Second cell of first row |
First cell of second row |
Second cell of second row |
See the big blank gap before the table starts? Yech!
The problem is all the carriage returns in the table code. The carriage returns are normally ignored when dealing with html, but the UBB is keeping them, and stacking them all up together before the table is displayed.
Same table code with Carriage returns removed...
code:
<table border=1 cellspacing=1><tr><td>First cell of first row</td><td>Second cell of first row</td>
</tr><tr><td>First cell of second row</td><td>Second cell of second row</td></tr></table>
(actually I did insert one CR in here, but only to break up the line and keep the screen formatting correctly. You get the idea.)
...will display like this...
First cell of first row | Second cell of first row |
First cell of second row |
Second cell of second row |
See? No spaces before table. Not sure if this is a bug with all UBB Boards or in this particular one. The table code is kind of hard to read without the carriage returns, but the important thing is how it looks in the end result anyway.
Geoschmo
[ November 25, 2003, 13:51: Message edited by: geoschmo ]