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

Centring paragraphs please help....

Hello,  Here are two examples of Macro's I have written (copied and pasted) but as you can see (pardon the pun) blinded is all nice and centred but Charmed is squished.  I have gone through each one in the actual macro and simply cannot figure out why, they are both written exactly the same (apart from the words of course)
1639508136

Edited 1639508177
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
This is unfortunately a limitation of the 5e roll templates. They don't have any padding set on the span. you could fix it for yourself by using some custom CSS via Stylus, but that would only make a difference for what you see, not others in your game.
1639508341

Edited 1639594306
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It would be helpful to post the actual macro text. My suspicion however, is that the line breaks just happen to fall very close to the margins and whatever parses the text (likely the browser) has decided to break at those points. This could be changed by using a CSS extension like stylus to increase the margins, but there are some simpler options. 1) re-word the text slightly to force line breaks at different points. Example, see how it displays if you replace "can't attack" with "cannot attack" 2) Try a different browser, which will have a different text rendering engine. 3) Use the npcaction roll template, which left justifies (usually easier to read) and allows for a clearer title.
Thank you both, really useful advice. I have been making more line breaks and that seems to have worked quite well. 
This is normal word wrap. Its just the words making it pad the ends differently and look different. In the 1st line of Blinded the word "automatically" would make the line have to many characters to fit so its moved "automatically" to line 2 and the ends of the first line are padded to center the text. In the 1st line of Charmed the word "charmer" just fits on the 1st line but there is no room for padding. If you insert an extra space between "the" and "charmer" then there will be to many characters and it will move "charmer" to the 2nd line and pad the 1st line to keep the text central. And so on for the other lines. A line break in the original (macro) text will force a line change but makes the original text a bit broken.  Its not actually the number of characters as characters have different widths. That means it also depends what font you use. There's probably a way it counts pixels/character width. 
Yeah thank you Mel C. I think the line break is the way forward.  Due to being able to resize 'Edit Macro' to any size really it is difficult to see what the outcome is unless you run the macro after every slight change. I am getting used to how long a sentence should be to 'fit' comfortably.   Luckily I have recently found the 'Clear Chat Archive' button so that my players don't think I am going crazy. :-) 
1639585383
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That template really needs some internal padding, anyway. At no point should text touch the border.
Garry Miller said: Yeah thank you Mel C. I think the line break is the way forward.  Due to being able to resize 'Edit Macro' to any size really it is difficult to see what the outcome is unless you run the macro after every slight change. I am getting used to how long a sentence should be to 'fit' comfortably.   Luckily I have recently found the 'Clear Chat Archive' button so that my players don't think I am going crazy. :-)  A few suggestions: You could use a different roll template, such as 'npcaction' instead of 'simple', which does have internal padding built in. While testing out the macro you can use the /talktomyself command so that it doesn't get posted visibly into chat for your players to see.  I still think you'll want to clear your chat archive anyways for yourself, but then you won't have to worry about your players seeing it. You can also just create a copy of the game and do all your testing there, and simply put the finished macros into your regular game.  That will keep the chat archive in your regular game totally clear.
Thank you Jarren, that is super helpful. Funny thing is, since a catastrophic melt down about a year ago I do actually back up my main game regularly and also test things like new API's and ADD ONS on them. I never even thought about testing this. DOH! Might swap to npcaction.  Cheers again for all help, really appreciate it. Sometimes the obvious solutions are staring right at you.