bootstrap text center in div code example

Example 1: bootstrap col center content

<div class="row">
    <div class="col-4 d-flex justify-content-center text-center">
        // for image and text
    </div>
</div>

Example 2: centre text bootstrap

<div class = "text-center">

	<p> hello world</p>


</div>

Example 3: bootstrap text center in div

<!-- recommended method -->
<div class="col-xs-1 text-center">

Example 4: center text with boostrap

<p class="text-left">Left aligned text on all viewport sizes.</p>
<p class="text-center">Center aligned text on all viewport sizes.</p> //CENTER TEXT
<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>

Tags:

Misc Example