Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap class "text-center" not working

<div class="input-group Flugo_group">
     <h4 class="text-center">or</h4>
</div>

i am try to show in center but not working.second time using position relative but not working properly in responsive design. center

like image 622
Archin Modi Avatar asked Dec 18 '16 13:12

Archin Modi


People also ask

Why is text align center not working?

This is because text-align:center only affects inline elements, and <aside> is not an inline element by default. It is a block-level element. To align it, we will have to use something other than text-align , or turn it into an inline element.

How do I center text in Bootstrap 4?

Text Alignment The text can justified by using the . text-justify class and for left, right, and center alignment of text, use the text-left, text-right and text-center classes respectively.

How do I center align text in Bootstrap 3?

By adding the ” text-center” class of Bootstrap 3 We can use the “text-center” class of bootstrap 3 for the center-alignment of an element. So in our td when we add “text-center” class, and then our table text goes to the center.

How do I center text in a container in Bootstrap?

Add class . text-center to the parent div to align text or any item inside to the center. You can also decide how the alignment should look like on the specific screen sizes.


1 Answers

I was facing the same problem in Bootstrap 4.1.0. Here is what I figured out:

I was doing this (having my paragraph inside div with class "row"):

<div class="container-fluid">
    <div class="row" style="background-color: #009688;">
       <p class="text-center" style="color: #fff;"> Meet me at</p>
    </div>
</div>

Later I removed the class and it worked.

<div class="container-fluid">
    <div style="background-color: #009688;">
       <p class="text-center" style="color: #fff;"> Meet me at</p>
    </div>
</div>
like image 129
UzumakiL Avatar answered Sep 20 '22 16:09

UzumakiL