I need to dynamically change the positions of two texts based on the text direction (LTR or RTL) using CSS specifically for an email template.
Here is the code snippet I am working with:
'<span style="font-weight:bold; text-align: center;">US Cop</span> ' + curIfr.Name
The text in curIfr.Name can be either in a RTL or LTR language, and I want to display it on the right side if it's RTL and on the left side if it's LTR.
Since the texts are centered within a card, I want to maintain this central alignment while switching their positions.
I attempted to use:
'<p style="float:right;"><span style="font-weight:bold; text-align: center;">US Cop</span></p>' + curIfr.Name
However, this caused the text to move to the far right rather than staying centered.
I also experimented with the direction attribute but found it to be ineffective in achieving the desired result.
Thank you in advance for any assistance!