Reputation:
I can use style
attribute for use text-align
but I want to use bootstrap class.
What's the equivalent of
style="text-align:left;"
in bootstrap 4?
Upvotes: 3
Views: 19387
Reputation: 3323
Simple answer is,
<p class="text-right">Right aligned text on all viewport sizes.</p>
For other alignments,
<p class="text-left">Left aligned text on all viewport sizes.</p>
<p class="text-center">Center aligned text on all viewport sizes.</p>
Alignment in other devices,
<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>
Hope this helps.
Upvotes: 6
Reputation: 19542
In bootstrap you can use class text-left
for style="text-align:left;"
, for more information check out this link
Upvotes: 3