jase:
Another addition: We can now set the alignment of a column with the divider row (the one with all the dashes). If you don't want the bolded/emphasised header row then just start the table with the divider row (even though it's then no longer actually dividing anything).
| Header 1.1 | Header 1.2 | Header 1.3 | 1.4 |50%
|<50%-------------|--------25%>|-----^--------|10%---|
|Header 2.1 | Cell 2.2 |<Cell 2.3 |
|2.3 Cell 3.1 | Cell 3.3 |< 3.4 |
|1.3 Cell\n4.3 |^ 4.4 |
|
| 6.1 | 6.2 | 6.4
Header 1.1 | Header 1.2 | Header 1.3 | 1.4 |
---|
Header 2.1 | Cell 2.2 | Cell 2.3 | |
Cell 3.1 | Cell 3.3 | 3.4 |
Cell 4.3 | 4.4 |
|
6.1 | 6.2 | 6.4 |
Note that when you're doing column span, the alignment might not turn up how you expect it (depending upon whether you focus on where the column starts or where it finishes). You may want/expect cell 3.1 to be right aligned, but it starts at column 1, so it gets the alignment from there. You can override the alignment of individual cells (see cell 2.3 as an example).
Widths can also be set with the divider row. The divider row can only have pipes (|), dashes and the alignment codes and width (which means even spaces aren't allowed). It doesn't actually matter whre you put the codes in between the pipes, as illustrated in the example.
Unless their alignment is set within the cell or via the whole column, table data (td) are left aligned, table headers (th) are centre aligned. Not sure if that's how it should be by default..?
I think I should stop fiddling with this now, it's getting to be a
massive routine.
Sorry to raise an old thread, but I have 2 issues, firstly relating to the above.
I have tried to determine the %age widths by putting the figures in the divider row as shown above, but when I do, it doesn't display properly.
instead of
.|!4 Basic Information |100%
.|20%= Character Name |30% Balik Giantborne |20%= Height |30% 7’10” |
.|= Player Name | Jonathan Bond |= Weight | 295 lbs |
.|= Character Race | Goliath |= Eyes | Green |
.|= Alignment | Chaotic Good |= Hair | Bald |
.|= Deity | Mordain |= Size | Medium |
.|!4 Class, Level & Experience |100%
.|20%= Primary Class |30% Barbarian |20%= Level |30% 5 |
.|= Multiclass 1 | - |= Level | - |
.|= Experience Points | 12,150 |= Total Level | 5 |
.|= Next Level At | 14,000 |= Proficiency | +3 |
.|= Max Health | 60 |= Initiative | +3 |
.|= Current Health | 40 |= Armour Class | 17 |
.|= Passive Perception | 14 |= Speed | 40' (30' in Heavy Armour) |
giving
Basic Information |
---|
Character Name | Balik Giantborne | Height | 7’10” |
---|
Player Name | Jonathan Bond | Weight | 295 lbs |
---|
Character Race | Goliath | Eyes | Green |
---|
Alignment | Chaotic Good | Hair | Bald |
---|
Deity | Mordain | Size | Medium |
---|
Class, Level & Experience |
---|
Primary Class | Barbarian | Level | 5 |
---|
Multiclass 1 | - | Level | - |
---|
Experience Points | 12,150 | Total Level | 5 |
---|
Next Level At | 14,000 | Proficiency | +3 |
---|
Max Health | 60 | Initiative | +3 |
---|
Current Health | 40 | Armour Class | 17 |
---|
Passive Perception | 14 | Speed | 40' (30' in Heavy Armour) |
---|
I get:
.|4 Basic Information |100%
.|20%------------------|30%------------------|20%------------|30%------------------------|
.|= Character Name | Balik Giantborne |= Height | 7’10” |
.|= Player Name | Jonathan Bond |= Weight | 295 lbs |
.|= Character Race | Goliath |= Eyes | Green |
.|= Alignment | Chaotic Good |= Hair | Bald |
.|= Deity | Mordain |= Size | Medium |
.|4 Class, Level & Experience |100%
.|20%------------------|30%------------------|20%------------|30%------------------------|
.|= Primary Class | Barbarian |= Level | 5 |
.|= Multiclass 1 | - |= Level | - |
.|= Experience Points | 12,150 |= Total Level | 5 |
.|= Next Level At | 14,000 |= Proficiency | +3 |
.|= Max Health | 60 |= Initiative | +3 |
.|= Current Health | 40 |= Armour Class | 17 |
.|= Passive Perception | 14 |= Speed | 40' (30' in Heavy Armour) |
giving
Basic Information |
---|
Character Name | Balik Giantborne | Height | 7’10” |
---|
Player Name | Jonathan Bond | Weight | 295 lbs |
---|
Character Race | Goliath | Eyes | Green |
---|
Alignment | Chaotic Good | Hair | Bald |
---|
Deity | Mordain | Size | Medium |
---|
Class, Level & Experience |
---|
Primary Class | Barbarian | Level | 5 |
---|
Multiclass 1 | - | Level | - |
---|
Experience Points | 12,150 | Total Level | 5 |
---|
Next Level At | 14,000 | Proficiency | +3 |
---|
Max Health | 60 | Initiative | +3 |
---|
Current Health | 40 | Armour Class | 17 |
---|
Passive Perception | 14 | Speed | 40' (30' in Heavy Armour) |
---|
Secondly, is there anyway to set a fixed rather than percentage width for the table. I don't mind %age widths for the columns, but I'm trying to prevent a 100% width table from continously expanding without having to resort to newline characters to break up larger paragraphs.
With normal tables I do
<table width="600">, but that doesn't work with your quick tables and neither can I mix the 2 syntaxes.