Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap 4 class for "text-align: left"

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?


2 Answers

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.

like image 155
Thanveer Shah Avatar answered Jun 17 '26 00:06

Thanveer Shah


In bootstrap you can use class text-left for style="text-align:left;", for more information check out this link

like image 33
Nisharg Shah Avatar answered Jun 16 '26 23:06

Nisharg Shah



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!