Centralising text on a particular word on a line
in OpenSesame
Hi!
I have three variables of text on one line, and I need the centre word to always be central, no matter how long the flanking words are on either side. I have tried various html tags, but they seem to put the text on a new line or centralise vertically instead.
I have tried:
<center> text </center>
<div style = "text-align: center"> text
<p> text </p></div>
<p style = "text-align: center"> text </p>
Any help would be greatly appreciated!
Emma
Comments
Hi Emma,
Is that figure an example of what you want to have or what you already have (in latter case, I don't get the problem)?
Have you tried using an inline_script? Writing text with inline_script has the advantage that you can specify whether text should be centered. https://osdoc.cogsci.nl/3.2/manual/python/canvas/#function-canvas46text40text-centertrue-xnone-ynone-max95widthnone-4242style95args41
Alternatively, you might try to concatenate the three variable into a single one?
Does that make sense?
Eduard