bblaney
 member, 176 posts
Wed 17 Aug 2022
at 21:23
Cell formatting
Hey guys, some help please

I am trying to get the following tables so the cells are centered in their respective spots, and I can't figure it out.

Thanks for your help

WEAPONTYPEAMMORELROFDMGCRITBLASTRANGEMAGARMORWEIGHT
Glock 19Pistol9x195212-217+1.5

Imladir
 member, 60 posts
Wed 17 Aug 2022
at 21:34
Cell formatting
Just replace the | with |^

|!! WEAPON | TYPE | AMMO| REL | ROF | DMG | CRIT | BLAST | RANGE | MAG | ARMOR | WEIGHT |50%
|^ Glock 19|^ Pistol|^ 9x19 |^  5  |^  2  |^  1  |^   2  |^   -   |^   2   |^ 17  |^   +1  |^   .5

WEAPONTYPEAMMORELROFDMGCRITBLASTRANGEMAGARMORWEIGHT
Glock 19Pistol9x195212-217+1.5

This message was last edited by the user at 21:36, Wed 17 Aug.

bblaney
 member, 177 posts
Wed 17 Aug 2022
at 21:37
Cell formatting
In reply to Imladir (msg # 2):

Thank you!!!!!!!!!!!
bblaney
 member, 178 posts
Thu 18 Aug 2022
at 00:03
Cell formatting
One more question.

How do I get it so everything is on one line, for each item?

Specifically where some items are jumbled, like the FN SCAR 17

WEAPONTYPEAMMORELROFDMGCRITBLASTRANGEMAGARMORWEIGHT
Glock 19Pistol9x195212-217+1.5
HK MP7SMG4.6x305612-330-1
FN SCAR 17BR7.62x515434-820-1.5
FN MK48 MOD 2GPMG7.62x515534-8100-2.5
Barrett MRADSR.338 Lapua Mag5133-165-2

Imladir
 member, 61 posts
Thu 18 Aug 2022
at 00:10
Cell formatting
You can try to replace the spaces with  , but it's a bit sketchy and without guarantees.
You could also increase the width of the total table and set the width of the first column, but there again, no guarantees, display will adapt to the screen.

Like that:

WEAPONTYPEAMMORELROFDMGCRITBLASTRANGEMAGARMORWEIGHT
Glock 19Pistol9x195212-217+1.5
HK MP7SMG4.6x305612-330-1
FN SCAR 17BR7.62x515434-820-1.5
FN MK48 MOD 2GPMG7.62x515534-8100-2.5
Barrett MRADSR.338 Lapua Mag5133-165-2

|!WEAPON |! TYPE |! AMMO |! REL |! ROF |! DMG |! CRIT |! BLAST |! RANGE |! MAG |! ARMOR |! WEIGHT |75%
|-30%----|-------|-------|------|------|------|-------|--------|--------|------|--------|---------|
|^ Glock 19 |^ Pistol|^ 9x19 |^  5  |^  2  |^  1  |^   2  |^   -   |^   2   |^ 17  |^   +1  |^   .5
|^ HK MP7  |^ SMG   |^4.6x30|^  5  |^  6  |^  1  |^   2  |^   -   |^   3   |^ 30  |^   -   |^   1
|^FN SCAR 17|^BR|^7.62x51|^5|^4|^3|^4|^-|^8|^20|^-|^1.5
|^FN MK48 MOD 2|^GPMG|^7.62x51|^5|^5|^3|^4|^-|^8|^100|^-|^2.5
|^Barrett MRAD|^SR|^ .338 Lapua Mag|^5|^1|^3|^3|^-|^16|^5|^-|^2
patchwolf
 member, 23 posts
Thu 18 Aug 2022
at 00:25
Re: Cell formatting
Short answer: you can't.

Normally, the table will word-wrap its contents to fit the size of the window of your browser.  Unless you can control this for every user (you can't), you can't prevent this behaviour from happening.
bblaney
 member, 179 posts
Thu 18 Aug 2022
at 00:56
Re: Cell formatting
Thanks both of you!!!!!!!!!!
jess_car_fix
 member, 139 posts
 license code (8817white)
Thu 18 Aug 2022
at 02:11
Re: Cell formatting
bblaney:
One more question.

How do I get it so everything is on one line, for each item?

Specifically where some items are jumbled, like the FN SCAR 17

WEAPONTYPEAMMORELROFDMGCRITBLASTRANGEMAGARMORWEIGHT
Glock 19Pistol9x195212-217+1.5
HK MP7SMG4.6x305612-330-1
FN SCAR 17BR7.62x515434-820-1.5
FN MK48 MOD 2GPMG7.62x515534-8100-2.5
Barrett MRADSR.338 Lapua Mag5133-165-2



if you attention to detail approaches OCD you could format you chart like this to get a narrow-er chart.

WEAPONTYPEAMMOWEIGHTRELROFDMGCRIT
Glock 19Pistol9x19.55212
BLASTRANGEMAGARMOR
-217+1
 RELROFDMGCRIT
HK MP7SMG4.6x3015612
BLASTRANGEMAGARMOR
-330-
 RELROFDMGCRIT
FN SCAR 17BR7.62x511.55434
BLASTRANGEMAGARMOR
-820-
 RELROFDMGCRIT
FN MK48 MOD 2GPMG7.62x512.55534
BLASTRANGEMAGARMOR
-8100-
 RELROFDMGCRIT
Barrett MRADSR.338 Lapua Mag25133
BLASTRANGEMAGARMOR
-165-
 RELROFDMGCRIT

the trick to getting it to work ...beside being touched by the OCD...

is what I call cell code (there must be a space after the "code" and none before it)

|< | makes the contents stick to the left

|> | makes the contents stick to the right

|^ | makes the contents stick in the center

|! | greyscales that cell & centers the contents of that cell only

|!! | greyscales that cell & centers the contents of that cell and every cell to the right of it.

|2 |  makes the cell 2 cells wide.

|3 | ...three wide ...etc

|1.2 | makes the cell 1 wide, but 2 tall

|2.2 | two wide and two tall

in my experience it is a bad idea to format with taller cells after shorter(height) cells. it tends to be a formatting nightmare so make the taller cells to the left and reduce size going left to right.

the order of the code does not seem to matter much as long as you don't separate the double ... !! ... or the ... (number)point(number)



|! WEAPON |! TYPE |! AMMO |! WEIGHT |! REL |! ROF |! DMG |! CRIT |
|!^1.3 Glock 19 |^1.3 Pistol |^1.3 9x19 |^1.3 .5 |^ 5 |^ 2 |^ 1 |^ 2 |
|! BLAST |! RANGE |! MAG |! ARMOR |
|^ - |^ 2 |^ 17 |^ +1 |
|!4 |! REL |! ROF |! DMG |! CRIT |
|!^1.3 HK MP7 |^1.3 SMG |^1.3 4.6x30 |^1.3 1 |^ 5 |^ 6 |^ 1 |^ 2 |
|! BLAST |! RANGE |! MAG |! ARMOR |
|^ - |^ 3 |^ 30 |^ - |
|!4 |! REL |! ROF |! DMG |! CRIT |
|!^1.3 FN SCAR 17 |^1.3 BR |^1.3 7.62x51 |^1.3 1.5 |^ 5 |^ 4 |^ 3 |^ 4 |
|! BLAST |! RANGE |! MAG |! ARMOR |
|^ - |^ 8 |^ 20 |^ - |
|!4 |! REL |! ROF |! DMG |! CRIT |
|!^1.3 FN MK48 MOD 2 |^1.3 GPMG |^1.3 7.62x51 |^1.3 2.5 |^ 5 |^ 5 |^ 3 |^ 4 |
|! BLAST |! RANGE |! MAG |! ARMOR |
|^ - |^ 8 |^ 100 |^ - |
|!4 |! REL |! ROF |! DMG |! CRIT |
|!^1.3 Barrett MRAD |^1.3 SR |^1.3 .338 Lapua Mag|^1.3 2 |^ 5 |^ 1 |^ 3 |^ 3 |
|! BLAST |! RANGE |! MAG |! ARMOR |
|^ - |^ 16 |^ 5 |^ - |
|!4 |! REL |! ROF |! DMG |! CRIT |



RPoL faqs (rubbcode)

see (tables) and (more advanced tables)

This message was last edited by the user at 21:54, Thu 18 Aug.

bblaney
 member, 180 posts
Thu 18 Aug 2022
at 09:56
Re: Cell formatting
Holy cow, that is awesome.

Yeah my OCD, for some things, gets a bit interesting.

This is great, thank you!
BlackWater
 member, 17 posts
 You lose! GOOD DAY, SIR!
 Yep! I got issues!
Thu 18 Aug 2022
at 10:42
Cell formatting
In reply to jess_car_fix (msg # 8):

You are now my personal RPoL hero.
ppwhere
 member, 30 posts
Fri 19 Aug 2022
at 10:37
Re: Cell formatting
In reply to jess_car_fix (msg # 8):

You can use table level formatting as well... This would make your table a little less crowded during edit

ABC
123


|^-|^-|^-|
|!! A| B| C
| 1| 2| 3
evileeyore
 member, 711 posts
 GURPS GM and Player
 Joined 20150819
Sun 21 Aug 2022
at 16:03
Cell formatting
If your CDO is as intense as mine can be about cell formatting... there is this thread here (buried deep in the subforum):
link to a message in this forum


Fair warning:  As noted here, some stuff (cell width forcing in particular) doesn't exactly work properly here in Responsive like it does on the Old Site.  So... some code might not function or it might function oddly.

For that sort of stuff, I prefer to make pics, which can be zoomed as the end user needs.  (But that's more work when a few cells need to be updated, so it's only "pics" for things that will not ever be changing,)

(Side note, yes that's the Old RPoL addy.  If used from within the Old Site, it goes to the Old Site, if used from within the Responsive, it get's converted to the Responsive site automagically.  Just a little tip when you link threads in your games and have a mixed bag of Players, Old and Responsive.)

This message was last edited by the user at 16:07, Sun 21 Aug.

LordVince
 member, 2 posts
Wed 7 Sep 2022
at 20:50
Cell formatting
Maybe-kinda-sorta related question...

Is there a command/code which will allow me to fill a cell with a background color other than gray?
Imladir
 member, 65 posts
Wed 7 Sep 2022
at 20:52
Cell formatting
No, you'd need to be able to use CSS tags for that, which you can't.
evileeyore
 member, 730 posts
 GURPS GM and Player
 Joined 20150819
Thu 8 Sep 2022
at 00:39
Cell formatting
jess_car_fix:
|! WEAPON |! TYPE |! AMMO |! WEIGHT |! REL |! ROF |! DMG |! CRIT |

Quick note, you don't need to put exclamation marks in each cell if you want the whole row to be a Header, you can put a double exclamation mark in the first cell.  In fact, once you drop double exclamations into a cell, that cell and every cell to it's right is a Header cell.

Like so:
|!! WEAPON | TYPE | AMMO | WEIGHT | REL | ROF | DMG | CRIT |
|^ Glock 19 |^ Pistol |^ 9x19 |^ 5 |^ 2 |^ 1 |^ 2 |^ - |

Yields:
WEAPONTYPEAMMOWEIGHTRELROFDMGCRIT
Glock 19Pistol9x195212-

While...
| WEAPON |!! TYPE | AMMO | WEIGHT | REL | ROF | DMG | CRIT |
|^ Glock 19 |^ Pistol |^ 9x19 |^ 5 |^ 2 |^ 1 |^ 2 |^ - |

Yields:
WEAPONTYPEAMMOWEIGHTRELROFDMGCRIT
Glock 19Pistol9x195212-


You can also throw RuBB formatting into the cell so if you want BOLDING without a Header background, or colors, or Italics, etc, like so:

While...
|!! <large>WEAPON</large> | TYPE | AMMO | WEIGHT | REL | ROF | <Rose>DMG</Rose> | <Orange>CRIT</Orange> |
|^ <b>Glock 19</b> |^ Pistol |^ 9x19 |^ 5 |^ 2 |^ 1 |^ <Rose>2</Rose> |^ <Orange>-</Orange> |

Yields:
WEAPONTYPEAMMOWEIGHTRELROFDMGCRIT
Glock 19Pistol9x195212-