Text-Alignment in bootstrap tooltip

0
Hi Everyone,   I am using the bootstrap tooltip widget. By default the text in the tooltip is centered.  I now have the requirement that part of the text should be aligned left.    Since the widget offers the option to render the tooltip content as HTML I thought it should be easy to implement.   My idea was to use: <p style="text-align:left"> Lorem ipsum </p> for the left-oriented text. However, for some reason this is not enacted in the widget, even though the string is passed correctly.   In the screenshots below you can see whats in the variable while debugging and then what’s passed to the “tooltip-inner” when I inspect (“standard guidance” is the part of the tooltip which should remain centered, as you can also see the <strong> html is working and passed correctly):   One thing to add: when I look on the variables tab without opening the value there are backslashes in front of the double quotes (see screenshot below).   Does anyone have an idea what the problem is? Appreciate any help here!   Cheers, Jan
asked
1 answers
0

Add a class instead of style attribute on the HTML element:

<p class="text-left"> Lorem ipsum </p>

 

answered