Html text alignment
https://getbootstrap.com/docs/4.0/utilities/text/
// <span> center
return '<span style="color:blue; ">' + data + '</span>'
// <span> right
return '<span style="color:green; ">' + formatNumber(Number(data), 'en-AU', '1.2-2') + '</span>'
// <tr><td> center
<tr align="center" class="align-middle center">
// <div> center
<div class="text-center" >
// Some code
<p class="text-left">Left aligned text on all viewport sizes.</p>
<p class="text-center">Center aligned text on all viewport sizes.</p>
<p class="text-right">Right aligned text on all viewport sizes.</p>
<p class="text-sm-left">Left aligned text on viewports sized SM (small) or wider.</p>
<p class="text-md-left">Left aligned text on viewports sized MD (medium) or wider.</p>
<p class="text-lg-left">Left aligned text on viewports sized LG (large) or wider.</p>
<p class="text-xl-left">Left aligned text on viewports sized XL (extra-large) or wider.</p>
//vertical-alignment
<span class="align-baseline">baseline</span>
<span class="align-top">top</span>
<span class="align-middle">middle</span>
<span class="align-bottom">bottom</span>
<span class="align-text-top">text-top</span>
<span class="align-text-bottom">text-bottom</span>
Last updated