Post
Topic
Board Meta
Re: How to create Table with BBCode
by
LoyceV
on 26/05/2018, 15:36:19 UTC
Code:
We will create a table with 1 row in which there will be a column. Take a table code and inside the table create a row. Then inside the row, create a column.

[table]
[tr]
[td]Username[/td]
[/tr]
[/table]
Until now, this is indeed what I did. It can be pain staking to add a column, as the data is spread out through the code (example).
I only recently found out you can also have columns within rows instead of rows within columns.

Example:
Code:
[table]
[tr][td]Username1[/td][td]Username2[/td][/tr]
[tr][td]UsernameA[/td][td]UsernameB[/td][/tr]
[/table]
Looks like:
Username1Username2
UsernameAUsernameB

Code:
[table]
[td][tr]Username1[/tr][tr]UsernameA[/tr][/td]
[td][tr]Username2[/tr][tr]UsernameB[/tr][/td]
[/table]
Looks exactly the same:
Username1
UsernameA
Username2
UsernameB
Update: the above code works fine, but when I edit my post, the forum changed it into something much bigger:
Code:
[table][tr]
[td][table][tr][td]Username1[/td][/tr][tr][td]UsernameA[/td][/tr][/table][/td]
[td][table][tr][td]Username2[/td][/tr][tr][td]UsernameB[/td][/tr][/table][/td][/tr][/table]
Now I'm confused why Tongue

By choosing the correct format based on your needs you make it easier for yourself later on.

Vertical borders
Use columns with just "|" to make vertical borders in or around your table (click for an example).