Twitter bootstrap float div right

Justin picture Justin · Feb 11, 2013 · Viewed 393.7k times · Source

What is the proper way in bootstrap to float a div to the right? I thought pull-right was the recommend way, but it is not working.

Answer

Amit picture Amit · Feb 11, 2013

To float a div to the right pull-right is the recommend way, I feel you are doing things right may be you only need to use text-align:right;

  <div class="container">
     <div class="row-fluid">
      <div class="span6">
           <p>Text left</p>
      </div>
      <div class="span6 pull-right" style="text-align:right">
           <p>text right</p>
      </div>
  </div>
 </div>      
 </div>