.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   Figured out how to display tables on this forum (http://forum.shrapnelgames.com/showthread.php?t=10797)

geoschmo November 25th, 2003 03:49 PM

Figured out how to display tables on this forum
 
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:
</font><blockquote><font size="1" face="sans-serif, arial, verdana">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">&lt;table border=1 cellspacing=1&gt;
&lt;tr&gt;
&lt;td&gt;First cell of first row&lt;/td&gt;
&lt;td&gt;Second cell of first row&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First cell of second row&lt;/td&gt;
&lt;td&gt;Second cell of second row&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt; </pre><hr /></blockquote><font size="2" face="sans-serif, arial, verdana">Will display like this:
<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>
See the big blank gap before the table starts? Yech! http://forum.shrapnelgames.com/images/icons/icon7.gif

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...
</font><blockquote><font size="1" face="sans-serif, arial, verdana">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">&lt;table border=1 cellspacing=1&gt;&lt;tr&gt;&lt;td&gt;First cell of first row&lt;/td&gt;&lt;td&gt;Second cell of first row&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;First cell of second row&lt;/td&gt;&lt;td&gt;Second cell of second row&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</pre><hr /></blockquote><font size="2" face="sans-serif, arial, verdana">(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...
<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>

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 ]

Fyron November 25th, 2003 05:55 PM

Re: Figured out how to display tables on this forum
 
I think it is just how UBB renders Posts. Every newline in a post body gets displayed as a newline, regardless of what is actually on it. http://forum.shrapnelgames.com/images/icons/icon7.gif

Andrés November 25th, 2003 06:31 PM

Re: Figured out how to display tables on this forum
 
This should be good HTML practice.
Normally multiple spaces or newlines are interpreted as a single space, but still there.

Line breaks, if necesary, must be within within cell text, since UBB seems to break <tags> then the < isn´t in the same line as the >

Like this:
<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>

Parasite November 25th, 2003 10:55 PM

Re: Figured out how to display tables on this forum
 
Is there a place to practice or try out things like this? I could make a topic and try, but an out of the way place that doesn't go to the top of the list would be better. Buttons boexes and other HTML stuff could be great.

[ November 25, 2003, 20:56: Message edited by: Parasite ]

Atrocities November 26th, 2003 12:12 AM

Re: Figured out how to display tables on this forum
 
<table border=1 cellspacing=1><tr><td>This
</td><td>Is
</td></tr><tr><td>Very
</td><td>Cool</td></tr></table>

PvK November 26th, 2003 12:18 AM

Re: Figured out how to display tables on this forum
 
Laugh
<table border=1 cellspacing=1><tr><td> http://forum.shrapnelgames.com/image...s/rolleyes.gif
</td><td> http://forum.shrapnelgames.com/images/icons/shock.gif
</td></tr><tr><td> http://forum.shrapnelgames.com/images/icons/icon10.gif
</td><td> http://forum.shrapnelgames.com/images/icons/tongue.gif </td></tr></table>

Slynky November 26th, 2003 12:55 AM

Re: Figured out how to display tables on this forum
 
Kewl beans http://forum.shrapnelgames.com/images/icons/icon6.gif

Loser November 26th, 2003 12:57 AM

Re: Figured out how to display tables on this forum
 
Quote:

Originally posted by Parasite:
Is there a place to practice or try out things like this? I could make a topic and try, but an out of the way place that doesn't go to the top of the list would be better. Buttons boexes and other HTML stuff could be great.
<font size="2" face="sans-serif, arial, verdana">There's always the nonsense thread.

Slynky November 26th, 2003 01:02 AM

Re: Figured out how to display tables on this forum
 
Can't one practice by just previewing the post? http://forum.shrapnelgames.com/images/icons/icon12.gif

Atrocities November 26th, 2003 01:04 AM

Re: Figured out how to display tables on this forum
 
</td><td>Is
</td></tr><tr><td>Very
</td><td>Cool</td></tr></table>


All times are GMT -4. The time now is 06:06 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.