Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Adjust/Align text in a template (5e OGL)

Dear Community, I have created a token monster macro and it works as intended. Cosmetic wise I would love all the numbers are aligned more to the right as shown on the picture below (or when using the {{template:default}}). Is that possible by using some html-magic similar to this styling? [NPC](~selected|npc#" style="background-color: transparent; padding: 0px; color: #7e2d40; display: inline-block; border: none; text-decoration: none;) Macro: @{selected|wtype}&{template:npcaction} {{name=@{selected|npc_name}}} {{rname=Saving Throws}} {{description=*Strength save:* [[1d20+@{selected|npc_str_save}[STR SAVE]]] | [[1d20+@{selected|npc_str_save}[STR SAVE]]] *Dexterity save:* [[1d20+@{selected|npc_dex_save}[DEX SAVE]]] | [[1d20+@{selected|npc_dex_save}[DEX SAVE]]] *Constitution save:* [[1d20+@{selected|npc_con_save}[CON SAVE]]] | [[1d20+@{selected|npc_con_save}[CON SAVE]]] *Intelligence save:* [[1d20+@{selected|npc_int_save}[INT SAVE]]] | [[1d20+@{selected|npc_int_save}[INT SAVE]]] *Wisdom save:* [[1d20+@{selected|npc_wis_save}[WIS SAVE]]] | [[1d20+@{selected|npc_wis_save}[WIS SAVE]]] *Charisma save:* [[1d20+@{selected|npc_cha_save}[CHA SAVE]]] | [[1d20+@{selected|npc_cha_save}[CHA SAVE]]]}}
1607559761

Edited 1607559788
If you style all of the left-hand items with: display: inline-block; width: 130px;  And all of the right hand items with:  display: inline-block; width: 40px;  You should be able to get a consistent appearance. You'll have to play with the exact numbers. You also have to deal with html substitutions for the rolls, because you'll have to use html styling for each roll into an inline-block to size it's width, and the ]] for the end of the roll will close the link. If all your rolls have a single digit or two digits, then it'll line up on its own, but if there are single digit rolls with two digit rolls, then columns won't be aligned.  /w gm &{template:npcaction} {{name=@{selected|npc_name}}} {{rname=Saving Throws}} {{description=*[Strength save:](#" style="background-color: transparent; padding: 0px; color: #7e2d40; display: inline-block; border: none; text-decoration: none; width: 130px;)* [[1d20+@{selected|npc_str_save}[STR SAVE]]] | [[1d20+@{selected|npc_str_save}[STR SAVE]]]*[Dexterity save:](#" style="background-color: transparent; padding: 0px; color: #7e2d40; display: inline-block; border: none; text-decoration: none; width: 130px;)* [[1d20+@{selected|npc_dex_save}[DEX SAVE]]] | [[1d20+@{selected|npc_dex_save}[DEX SAVE]]]*[Constitution save:](#" style="background-color: transparent; padding: 0px; color: #7e2d40; display: inline-block; border: none; text-decoration: none; width: 130px;)* [[1d20+@{selected|npc_con_save}[CON SAVE]]] | [[1d20+@{selected|npc_con_save}[CON SAVE]]]*[Intelligence save:](#" style="background-color: transparent; padding: 0px; color: #7e2d40; display: inline-block; border: none; text-decoration: none; width: 130px;)* [[1d20+@{selected|npc_int_save}[INT SAVE]]] | [[1d20+@{selected|npc_int_save}[INT SAVE]]]*[Wisdom save:](#" style="background-color: transparent; padding: 0px; color: #7e2d40; display: inline-block; border: none; text-decoration: none; width: 130px;)* [[1d20+@{selected|npc_wis_save}[WIS SAVE]]] | [[1d20+@{selected|npc_wis_save}[WIS SAVE]]]*[Charisma save:](#" style="background-color: transparent; padding: 0px; color: #7e2d40; display: inline-block; border: none; text-decoration: none; width: 130px;)* [[1d20+@{selected|npc_cha_save}[CHA SAVE]]] | [[1d20+@{selected|npc_cha_save}[CHA SAVE]]]}}
Jarren K, thank you again. :-) I managed to make it work with only using the code on the left-hand items using: [THANKYOU](#" style="background-color: transparent; padding: 0px; color: #404040; display: inline-block; border: none; text-decoration: none; width: 120px;)