how to justify My text in bootstrap

3.1k views Asked by At

Hello I am using Bootstrap in Laravel to develop My web. I need to justify My paragraph. but in my bootstrap it is not supporting. how can I do it?

This is My bootstrap format:

 <div class="container">
   <div class="row">
     <div class="col-md-10 col-md-offset-1">
        <div class="panel panel-default">
          <div class="panel-heading" ><b>BOARD OF DIRECTORS</b>
                   this is My text area
          </div>
        </div>
     </div>
   </div>
</div>
2

There are 2 answers

0
Darshak On BEST ANSWER

There is one class in bootstrap call "text-justify" using that you can achieve text justify in bootstrap.

 <div class="container">

        <div class="row">

            <div class="col-md-10 col-md-offset-1">

                <div class="panel panel-default">

                    <div class="panel-heading text-justify"><b>BOARD OF DIRECTORS</b>
this is My text area

</div>

    </div>
    </div>
    </div>
    </div>
    </div>

for more details you can see below link

http://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_ref_text-left&stacked=h

0
Shivkumar kondi On

There is text-justify link class in bootstrap .

but Seeing to your code it seems you may want to put indent to your outer text.

If so use this..

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>


<div class="container">
   <div class="row">
     <div class="col-md-10 col-md-offset-1">
        <div class="panel panel-default">
          <div class="panel-heading text-justify" ><b>BOARD OF DIRECTORS</b>
                This is My text area
                <p class="text-justify" style="text-indent: 50px;"> This is My text area </p>
          </div>
        </div>
     </div>
   </div>
</div>
       


</body>
</html>