posted 12-07-1998 12:39 AM
Rod makes an interesting suggestion. The (pre)...(/pre) HTML tag presents preformatted text in a fixed-width font. This may be a way to create a table-like presentation though it has a number of limitations.When using this tag, you do need to set a font - preferably a fixed width font.
Here's an example with the (pre) tag alone.
Example 1
10001 40 120 13000
42 1001 3000 474
3333 11111 1 74
Here's an example with the font set to Courier:
Example 2
10001 40 120 3000
42 5600 3000 474
333 11111 8 99
In both cases no other formatting (other than color) was done. The font size is the default chosen by the OS, or by whatever you have set for your fixed width font. As you can see, the fixed-width font is needed to maintain the alignment necessary for a tabular display.
See how much space there is between the lines above? That's not space I intended or tried to include. Alas, the UBB parser bites us once again. Let's remove the pesky Carriage-Return characters and see what it looks like:
Example 3
10001 40 120 3000
42 5600 3000 474
333 11111 8 99
Ahh, much better. Unfortunately when you see the example for this it comes out unformatted and no more easier to use than the table example upthread. That's cause we had to toast the Carriage-Returns.
Here's the code used to create #3 above:
Code Snippet A
(font face="Courier" color="red")(pre)10001 40 120 3000(/pre)(pre) 42 5600 3000 474(/pre)(pre) 333 11111 8 99(/pre)(/font)
Kinda messy, eh?
The aligned example with the extra line-spacing is probably the best trade-off between having a tabular format and having an example thats reasonably straightforward for folks to use. Here's the code that was used to create Example #2,above.
Code Snippet B
(font face="Courier" color="blue")
(pre)10001 40 120 3000(/pre)
(pre) 42 5600 3000 474(/pre)
(pre) 333 11111 8 99(/pre)
(/font)
Easier to read, but introduces extra white-space. Nonetheless, it'll do pig, it'll do.
I had to format Code Snippet B with the (pre) tag. This allows it to show the alignment in the example itself. Fortunately, the message input box (where you type your message) uses a fixed width font, so when you create your example, it should be aligned.
Sometime this week, I'll put together a bit more formalized example with instructions for creating a tabular presentation using the (pre) tag. The parser does less damage here than it does to tables. Thanks for the idea, Rod!
Rgds,
__
/im
Notes:
1. throughout this entire message the parentheses are used as place holders for angle-brackets.
2. I'd like to suggest we universally adopt the parenthesis for examples of both HTML and UBB code then tell folks what to substitute. If we use brackets for the HTML, it'll look like UBB. Any thoughts?
[This message has been edited by JTimothyA (edited 12-07-98).]