by Max Barry

Latest Forum Topics

Advertisement

16

DispatchMetaReference

by Wormfodder delivery. . 153 reads.

The Friendly Wormfodder Deliverer's Guide to Tables and Flipping them (ノ ゜Д゜)ノ ︵ ┻━┻

Greetings, as I noticed that there wasn't really a proper Guide to the use of the most powerful design tool this website has, here is my tiny but hopefully helpful guide to the tabeling.

First, let's start with what a table is:
A table is an arrangement of a data structure, consisting of rows and columns.
While it can be used in the classical way of being directly a table, there are many ways you can use it for that don't conform to such simple concepts, be it complete layouting, interactive panels and a lot of other things, it wouldn't be false to say they are one of the most powerful design tools NS has, despite their flaws, which I shall elaborate at a later point.

For the sake of presentation, and the code tag not working in Factbooks, I will deactivate the tags using Zero Width Non-Joiners, which are not depicted, but recognized by the site builder.

Now, have I awakened yer' interest? I'll now start with the basics and go deeper from there.


Now then, a table is created by using the Table tags [‌‌tabl‌e][/‌tabl‌e] and inside that, several Table rows with [t‌r][/‌t‌r] and inside those several table columns via [t‌d][/‌td].
For example, a basic 3x3 table would look like this in code:
[‌‌tabl‌e]
[t‌r][t‌d]1[/‌td][t‌d]2[/‌td][t‌d]3[/‌td][/‌t‌r]
[t‌r][t‌d]4[/‌td][t‌d]5[/‌td][t‌d]6[/‌td][/‌t‌r]
[t‌r][t‌d]7[/‌td][t‌d]8[/‌td][t‌d]9[/‌td][/‌t‌r]
[/‌tabl‌e]
Which would look like this:

1

2

3

4

5

6

7

8

9

Note that linebreaks inbetween the tags that aren't td are ignored, so they are useful in order to make it a bit more orderly to work with.

Now, ye might wish that maybe the header at the beginning maybe wasn't there, or maybe that the table was entirely invisible and didn't highlight when you hover over it with the mouse?
Fear not, because there are three style types!
First the Basic, depicted above!
Second [‌t‌ab‌l‌e‌‌‌=n‌oh‌ead‌er‌]

1

2

3

4

5

6

7

8

9

And third [‌t‌ab‌l‌e‌‌‌=plain], which I find the most convenient of them all.

1

2

3

4

5

6

7

8

9



And now the big ones, you remember the part where I talked about Layouting? This is achieved with the beloved tag that is [t‌d]!
The name of the way one can alter them is called span, both rowspan and colspan respectively, which allow you to make cells that stretch along the row and column. This is done by altering the tag like this[t‌d=c2] for cells that span the column and [t‌d=r2] for cells that span the row. Sadly, after my knowledge, making a cell that spans both rows and columns at the same time is currently not possible with NSBBcode.
Note that the replaced tabs have to be removed from the other cells instead of getting overwritten.
So, a 3x3 Table with Rowspan looks like this in code:
[‌‌tabl‌e=noheader]
[t‌r][t‌d=r3]1[/‌td][t‌d]2[/‌td][t‌d]3[/‌td][/‌t‌r]
[t‌r][t‌d]5[/‌td][t‌d]6[/‌td][/‌t‌r]
[t‌r][t‌d]8[/‌td][t‌d]9[/‌td][/‌t‌r]
[/‌tabl‌e]
Which would look like this:

1

2

3

5

6

8

9

While, a 3x3 Table with Colspan looks like this in code:
[‌‌tabl‌e=noheader]
[t‌r][t‌d=c3]1[/‌td][/‌t‌r]
[tr][td]4[/td][td]5[/td][td]6[/td][/tr]
[tr][td]7[/td][td]8[/td][td]9[/td][/tr]
[/‌tabl‌e]
Which would look like this:

1

4

5

6

7

8

9

However, these are ideally used with Table=Plain, as the highlighting is terribly buggy with rowspan employed, though for visualization the ones with highlighting are rather useful.

With this tool, one is empowered to create truly wonderful factbooks with many layouts, however, there are some disadvantages with the Nationstates implementation, which I shall list now.

  • Tables have automatic Padding enabled, even in the plain option, so trying to have a full artistic special table will require some play-around, for example my Ending Compass on the Onox Legion where I had to eventually measure the pixels in order to make the sides line up, but give up on the original idea of having it all snugly fit.

  • As mentioned before there is, as far as I know, no way to make a table cell both span columns and rows at the same time, which does hinder truly powerful design possibilities

  • As convenient as the table plain is, it sadly doesn't have a version with table borders, which can be undesirable designwise, though I did manage a plain table with a pseudoheader on the homepage by using Background-Block and Text tags.

Now that is all about the Tables of NS.
And remember: (ノ ゜Д゜)ノ ︵ ┻━┻

Wormfodder delivery

Edited:

RawReport