![]() |
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;"><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> </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;"><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></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 ] |
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
|
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> |
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 ] |
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> |
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> |
Re: Figured out how to display tables on this forum
|
Re: Figured out how to display tables on this forum
Quote:
|
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
|
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.